generator-reshow 0.17.51 → 0.17.53
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.
|
@@ -41,7 +41,7 @@ jobs:
|
|
|
41
41
|
name: build Docker image
|
|
42
42
|
command: |
|
|
43
43
|
VER_PREFIX=$(support/VER_PREFIX.sh)
|
|
44
|
-
IMAGE_NAME=$(support/
|
|
44
|
+
IMAGE_NAME=$(support/remoteImage.sh)
|
|
45
45
|
BUILD_VERSION=<< parameters.docker-tag >>
|
|
46
46
|
BUILD_FOLDER=${VER_PREFIX}-<< parameters.docker-tag >>
|
|
47
47
|
BUILD_ARG=""
|
|
@@ -51,7 +51,7 @@ jobs:
|
|
|
51
51
|
- run:
|
|
52
52
|
name: Publish Docker Image to Docker Hub
|
|
53
53
|
command: |
|
|
54
|
-
./compile.sh p << parameters.docker-tag >>
|
|
54
|
+
DOCKER_HUB=1 ./compile.sh p << parameters.docker-tag >>
|
|
55
55
|
|
|
56
56
|
workflows:
|
|
57
57
|
run-job:
|
|
@@ -37,13 +37,13 @@ push() {
|
|
|
37
37
|
tag=latest
|
|
38
38
|
else
|
|
39
39
|
tag=$PUSH_VERSION
|
|
40
|
-
if [ "x$LATEST_TAG"
|
|
40
|
+
if [ "x$LATEST_TAG"!="xlatest" ]; then
|
|
41
41
|
tag=$LATEST_TAG-$PUSH_VERSION
|
|
42
42
|
fi
|
|
43
43
|
fi
|
|
44
44
|
echo "* <!-- Start to push ${remoteImage}:$tag"
|
|
45
45
|
IS_LOGIN=$(echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_LOGIN" --password-stdin)
|
|
46
|
-
if !
|
|
46
|
+
if [ ! $IS_LOGIN=~"Succeeded" ]; then
|
|
47
47
|
echo "Login Failed."
|
|
48
48
|
exit 1
|
|
49
49
|
fi
|
|
@@ -51,13 +51,14 @@ push() {
|
|
|
51
51
|
echo "* Finish pushed -->"
|
|
52
52
|
echo ""
|
|
53
53
|
if [ ! -z "$1" ]; then
|
|
54
|
-
if [ "x$VERSION"
|
|
54
|
+
if [ "x$VERSION"=="x$PUSH_VERSION" ]; then
|
|
55
55
|
echo "* <!-- Start to auto push ${remoteImage}:${LATEST_TAG}"
|
|
56
56
|
docker tag ${remoteImage}:$tag ${remoteImage}:${LATEST_TAG}
|
|
57
57
|
docker push ${remoteImage}:${LATEST_TAG}
|
|
58
58
|
echo "* Finish pushed -->"
|
|
59
59
|
fi
|
|
60
60
|
fi
|
|
61
|
+
docker logout
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
build() {
|
|
@@ -74,7 +75,7 @@ build() {
|
|
|
74
75
|
BUILD_ARG="$BUILD_ARG --build-arg ALT_VERSION=${ALT_VERSION}"
|
|
75
76
|
fi
|
|
76
77
|
echo build: ${DIR}/${DOCKER_FILE}
|
|
77
|
-
if [ "x"
|
|
78
|
+
if [ "x"!="x$NO_CACHE" ]; then
|
|
78
79
|
echo nocache: ${NO_CACHE}
|
|
79
80
|
fi
|
|
80
81
|
docker build ${BUILD_ARG} ${NO_CACHE} -f ${DIR}/${DOCKER_FILE} -t $localImage ${DIR}
|
|
@@ -8,7 +8,11 @@ DIR="$(
|
|
|
8
8
|
ENV=${DIR}/../.env.build
|
|
9
9
|
|
|
10
10
|
if [ -z "$remoteImage" ]; then
|
|
11
|
-
|
|
11
|
+
if [ -z "$DOCKER_HUB" ]; then
|
|
12
|
+
remoteImage=$(awk -F "=" '/^remoteImage/ {print $2}' $ENV)
|
|
13
|
+
else
|
|
14
|
+
remoteImage=$(awk -F "=" '/^dockerHubImage/ {print $2}' $ENV)
|
|
15
|
+
fi
|
|
12
16
|
fi
|
|
13
17
|
|
|
14
18
|
echo $remoteImage
|
package/package.json
CHANGED