generator-reshow 0.17.60 → 0.17.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,7 +18,10 @@ jobs:
18
18
  - run:
19
19
  name: "Test with terratest"
20
20
  command: |
21
- go test -v ./tests
21
+ go test -timeout 30m -v ./tests | tee test_output.log
22
+ terratest_log_parser -testlog test_output.log -outputdir test_output
23
+ - store_test_results:
24
+ path: test_output
22
25
  build-and-publish:
23
26
  parameters:
24
27
  docker-tag:
@@ -53,10 +56,16 @@ jobs:
53
56
  name: build Docker image
54
57
  command: |
55
58
  VER_PREFIX=$(support/VER_PREFIX.sh)
59
+ VERSION=$(support/VERSION.sh)
60
+ ALT_VERSION=$(support/ALT_VERSION.sh)
56
61
  IMAGE_NAME=$(DOCKER_HUB=1 support/remoteImage.sh)
57
62
  BUILD_VERSION=<< parameters.docker-tag >>
58
63
  BUILD_FOLDER=${VER_PREFIX}-<< parameters.docker-tag >>
59
64
  BUILD_ARG=""
65
+ if [ "x$VERSION" == "x$BUILD_VERSION" ]; then
66
+ BUILD_ARG="--build-arg ALT_VERSION=${ALT_VERSION}"
67
+ fi
68
+ echo "Build ARGS: ${BUILD_ARG}"
60
69
  docker build ${BUILD_ARG} -f ${BUILD_FOLDER}/Dockerfile \
61
70
  -t $IMAGE_NAME:${BUILD_VERSION} \
62
71
  ./${BUILD_FOLDER}
@@ -19,7 +19,7 @@ containerName=${localImage//\//-}-${pid}
19
19
 
20
20
  echo $containerName
21
21
 
22
- cli='env docker run --rm -it'
22
+ cli='env docker run --rm -it --platform linux/amd64'
23
23
  cli+=" -v $DIR/../docker/entrypoint.sh:/entrypoint.sh"
24
24
  cli+=" -v $MY_PWD:$MY_PWD"
25
25
  cli+=" -w $MY_PWD"
@@ -9,7 +9,7 @@ localImage=$(${DIR}/../support/localImage.sh)
9
9
  pid=$$
10
10
  folderName=${PWD##*/}
11
11
 
12
- cli='env docker run --rm -it'
12
+ cli='env docker run --rm -it --platform linux/amd64'
13
13
  cli+=" -v $DIR/../docker/entrypoint.sh:/entrypoint.sh"
14
14
  cli+=" --name ${folderName}-${pid} ${localImage}"
15
15
  echo $cli
@@ -6,10 +6,10 @@ DIR="$(
6
6
 
7
7
  TERRATEST=$(${DIR}/../support/TERRATEST.sh)
8
8
 
9
- docker run --rm -v $DIR/../:/app/test \
9
+ docker run --rm --platform linux/amd64 -v $DIR/../:/app/test \
10
10
  -v /var/run/docker.sock:/var/run/docker.sock \
11
11
  -w /app/test \
12
12
  $TERRATEST \
13
- go test -v ./tests
13
+ go test -timeout 30m -v ./tests
14
14
 
15
15
 
@@ -9,6 +9,7 @@ localImage=$(${DIR}/support/localImage.sh)
9
9
  remoteImage=$(${DIR}/support/remoteImage.sh)
10
10
  archiveFile=$DIR/archive.tar
11
11
  VERSION=$(${DIR}/support/VERSION.sh)
12
+ ALT_VERSION=$(${DIR}/support/ALT_VERSION.sh)
12
13
  DOCKER_FILE=${DOCKER_FILE:-Dockerfile}
13
14
 
14
15
  list() {
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env sh
2
+ DIR="$(
3
+ cd "$(dirname "$0")"
4
+ pwd -P
5
+ )"
6
+
7
+ if [ -z $ALT_VERSION ]; then
8
+ ALT_VERSION=$(awk -F "=" '/^ALT_VERSION/ {print $2}' ${DIR}/../.env.build)
9
+ fi
10
+
11
+ echo $ALT_VERSION
@@ -36,7 +36,11 @@ pre-test:
36
36
  stage: test
37
37
  image: $CI_TERRATEST
38
38
  script:
39
- - go test -v ./tests
39
+ - go test -v ./tests | tee test_output.log
40
+ - terratest_log_parser -testlog test_output.log -outputdir test_output
41
+ artifacts:
42
+ reports:
43
+ junit: ./test_output/report.xml
40
44
 
41
45
  build-docker-image:
42
46
  extends: .parallel
@@ -38,6 +38,7 @@
38
38
  "build": "npm run clean && npm run build:cjs && npm run build:es && npm run build:type",
39
39
  "mochaFor": "STRICT_MODE=on mocha -r global-jsdom/register",
40
40
  "mocha": "npm run mochaFor -- 'build/{cjs,es}/**/__tests__/*.{js,mjs}'",
41
+ "test:report": "npm run build && npm run mochaFor -- --reporter mocha-junit-reporter --reporter-options mochaFile=./test_output/mocha.xml 'build/{cjs,es}/**/__tests__/*.{js,mjs}'",
41
42
  "test": "npm run build && npm run mocha",
42
43
  "prepublishOnly": "npm run test"
43
44
  },
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.17.60",
2
+ "version": "0.17.62",
3
3
  "name": "generator-reshow",
4
4
  "repository": {
5
5
  "type": "git",