generator-reshow 0.17.68 → 0.17.70
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.
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
version: 2.1
|
|
2
2
|
|
|
3
|
+
commands:
|
|
4
|
+
install-docker-buildx:
|
|
5
|
+
description: Install Docker Buildx
|
|
6
|
+
steps:
|
|
7
|
+
- run:
|
|
8
|
+
name: Install Docker Buildx
|
|
9
|
+
command: |
|
|
10
|
+
mkdir -vp ~/.docker/cli-plugins/
|
|
11
|
+
curl --silent -L "https://github.com/docker/buildx/releases/download/v0.10.4/buildx-v0.10.4.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
|
|
12
|
+
chmod a+x ~/.docker/cli-plugins/docker-buildx
|
|
13
|
+
docker buildx version
|
|
14
|
+
sudo apt-get update && sudo apt-get install -y binfmt-support qemu-user-static
|
|
15
|
+
docker run --rm --privileged tonistiigi/binfmt --install arm64
|
|
16
|
+
docker context create buildcontext
|
|
17
|
+
docker buildx create buildcontext --use
|
|
18
|
+
|
|
3
19
|
executors:
|
|
4
20
|
docker-publisher:
|
|
5
21
|
docker:
|
|
@@ -13,7 +29,7 @@ jobs:
|
|
|
13
29
|
steps:
|
|
14
30
|
- checkout
|
|
15
31
|
- setup_remote_docker:
|
|
16
|
-
version: 20.10.
|
|
32
|
+
version: 20.10.18
|
|
17
33
|
docker_layer_caching: true
|
|
18
34
|
- run:
|
|
19
35
|
name: "Test with terratest"
|
|
@@ -30,7 +46,7 @@ jobs:
|
|
|
30
46
|
steps:
|
|
31
47
|
- checkout
|
|
32
48
|
- setup_remote_docker:
|
|
33
|
-
version: 20.10.
|
|
49
|
+
version: 20.10.18
|
|
34
50
|
docker_layer_caching: true
|
|
35
51
|
- run:
|
|
36
52
|
name: Log time
|
|
@@ -52,6 +68,10 @@ jobs:
|
|
|
52
68
|
cat ${BUILD_FOLDER}/$file
|
|
53
69
|
echo ""
|
|
54
70
|
done
|
|
71
|
+
- install-docker-buildx
|
|
72
|
+
- run:
|
|
73
|
+
name: login
|
|
74
|
+
command: ./compile.sh login
|
|
55
75
|
- run:
|
|
56
76
|
name: build Docker image
|
|
57
77
|
command: |
|
|
@@ -62,17 +82,23 @@ jobs:
|
|
|
62
82
|
BUILD_VERSION=<< parameters.docker-tag >>
|
|
63
83
|
BUILD_FOLDER=${VER_PREFIX}-<< parameters.docker-tag >>
|
|
64
84
|
BUILD_ARG=""
|
|
85
|
+
LATEST_TAG=""
|
|
65
86
|
if [ "x$VERSION" == "x$BUILD_VERSION" ]; then
|
|
66
|
-
|
|
87
|
+
if [ -n "${ALT_VERSION}" ]; then
|
|
88
|
+
BUILD_ARG="--build-arg ALT_VERSION=${ALT_VERSION}"
|
|
89
|
+
fi
|
|
90
|
+
LATEST_TAG="-t $IMAGE_NAME:latest"
|
|
67
91
|
fi
|
|
68
92
|
echo "Build ARGS: ${BUILD_ARG}"
|
|
69
|
-
docker
|
|
70
|
-
|
|
93
|
+
docker buildx inspect --bootstrap
|
|
94
|
+
docker buildx build ${BUILD_ARG} -f ${BUILD_FOLDER}/Dockerfile \
|
|
95
|
+
--push \
|
|
96
|
+
--platform linux/amd64,linux/arm64/v8 \
|
|
97
|
+
-t $IMAGE_NAME:${BUILD_VERSION} ${LATEST_TAG} \
|
|
71
98
|
./${BUILD_FOLDER}
|
|
72
99
|
- run:
|
|
73
|
-
name:
|
|
74
|
-
command:
|
|
75
|
-
DOCKER_HUB=1 ./compile.sh p << parameters.docker-tag >>
|
|
100
|
+
name: logout
|
|
101
|
+
command: docker logout
|
|
76
102
|
|
|
77
103
|
workflows:
|
|
78
104
|
run-job:
|
|
@@ -31,9 +31,7 @@ tag() {
|
|
|
31
31
|
echo "* Finish tag -->"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
PUSH_VERSION=${1:-$VERSION}
|
|
36
|
-
LATEST_TAG=${2:-latest}
|
|
34
|
+
login() {
|
|
37
35
|
IS_LOGIN=$(echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_LOGIN" --password-stdin 2>&1)
|
|
38
36
|
if [ -z "${IS_LOGIN+y}" ]; then
|
|
39
37
|
echo "Not get login info."
|
|
@@ -43,6 +41,12 @@ push() {
|
|
|
43
41
|
echo "Login not Succeeded."
|
|
44
42
|
exit 2
|
|
45
43
|
fi
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
push() {
|
|
47
|
+
login
|
|
48
|
+
PUSH_VERSION=${1:-$VERSION}
|
|
49
|
+
LATEST_TAG=${2:-latest}
|
|
46
50
|
if [ -z "$PUSH_VERSION" ]; then
|
|
47
51
|
tag=latest
|
|
48
52
|
else
|
|
@@ -106,6 +110,9 @@ case "$1" in
|
|
|
106
110
|
restore)
|
|
107
111
|
restore
|
|
108
112
|
;;
|
|
113
|
+
login)
|
|
114
|
+
login
|
|
115
|
+
;;
|
|
109
116
|
p)
|
|
110
117
|
push $2 $3
|
|
111
118
|
;;
|
package/package.json
CHANGED