File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -50,31 +50,31 @@ executors:
50
50
resource_class : small
51
51
docker-amd64 :
52
52
docker :
53
- - image : snyklabs/cli-build-private:20250909-140502
53
+ - image : snyklabs/cli-build-private:20250910-083449
54
54
auth :
55
55
username : $DOCKER_CLI_BUILD_USERNAME
56
56
password : $DOCKER_CLI_BUILD_PASSWORD
57
57
working_directory : /mnt/ramdisk/snyk
58
58
resource_class : large
59
59
docker-amd64-xl :
60
60
docker :
61
- - image : snyklabs/cli-build-private:20250909-140502
61
+ - image : snyklabs/cli-build-private:20250910-083449
62
62
auth :
63
63
username : $DOCKER_CLI_BUILD_USERNAME
64
64
password : $DOCKER_CLI_BUILD_PASSWORD
65
65
working_directory : /mnt/ramdisk/snyk
66
66
resource_class : xlarge
67
67
docker-arm64 :
68
68
docker :
69
- - image : snyklabs/cli-build-private-arm64:20250909-140502
69
+ - image : snyklabs/cli-build-private-arm64:20250910-083449
70
70
auth :
71
71
username : $DOCKER_CLI_BUILD_USERNAME
72
72
password : $DOCKER_CLI_BUILD_PASSWORD
73
73
working_directory : /mnt/ramdisk/snyk
74
74
resource_class : arm.large
75
75
docker-arm64-xl :
76
76
docker :
77
- - image : snyklabs/cli-build-private-arm64:20250909-140502
77
+ - image : snyklabs/cli-build-private-arm64:20250910-083449
78
78
auth :
79
79
username : $DOCKER_CLI_BUILD_USERNAME
80
80
password : $DOCKER_CLI_BUILD_PASSWORD
Original file line number Diff line number Diff line change 30
30
steps :
31
31
- uses : actions/checkout@v5
32
32
- uses : docker/setup-buildx-action@v3
33
+ - uses : docker/login-action@v3
34
+ with :
35
+ username : ${{ secrets.DOCKER_CLI_BUILD_USERNAME }}
36
+ password : ${{ secrets.DOCKER_CLI_BUILD_PASSWORD }}
33
37
- name : Build Docker image (${{ matrix.arch }})
34
38
env :
35
39
DOCKER_REPO : snyklabs
Original file line number Diff line number Diff line change @@ -6,12 +6,14 @@ if [[ -n "${CI:-}" ]]; then
6
6
else
7
7
# Local development: echo all commands for debugging
8
8
set -exuo pipefail
9
+ # Set up cleanup for local development
10
+ trap ' docker logout' EXIT
9
11
fi
10
12
11
- trap ' docker logout' EXIT
12
13
13
14
# This script is used for building Docker images which in turn build the CLI.
14
- # It sets up the environment, logs into Docker, and builds images for different architectures.
15
+ # It sets up the environment and builds images for different architectures.
16
+ # Docker login should be handled by the CI/CD system (e.g., GitHub Actions).
15
17
16
18
# Before running the script, ensure DOCKER_REPO, DOCKER_USERNAME and DOCKER_PASSWORD environment variables are set.
17
19
# Example usage:
@@ -42,8 +44,11 @@ pushd "$SCRIPT_DIR/.."
42
44
echo " Building Docker image for $TARGET_ARCH with Node version: $NODEVERSION "
43
45
echo " Timestamp: $TAG "
44
46
45
- echo " Logging into Docker"
46
- echo " $DOCKER_PASSWORD " | docker login -u " $DOCKER_USERNAME " --password-stdin
47
+ # For local development, login to Docker
48
+ if [[ -z " ${CI:- } " ]]; then
49
+ echo " Logging into Docker"
50
+ echo " $DOCKER_PASSWORD " | docker login -u " $DOCKER_USERNAME " --password-stdin
51
+ fi
47
52
48
53
echo " Building $TARGET_ARCH image..."
49
54
You can’t perform that action at this time.
0 commit comments