Skip to content

Commit c2dd686

Browse files
committed
login with docker
1 parent fd2df07 commit c2dd686

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

test/Vagrantfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
6262
cat << EOF >> /root/.profile
6363
export GIT_BRANCH=#{ENV['BUILDKITE_BRANCH']}
6464
export TEST_TYPE=#{ENV['TEST_TYPE']}
65+
export DOCKER_USERNAME=#{ENV['DOCKER_USERNAME']}
66+
export DOCKER_PASSWORD=#{ENV['DOCKER_PASSWORD']}
6567
EOF
6668
SHELL
6769

test/smoke-test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
set -euxfo pipefail
33

44
configure_docker() {
5+
if [ -n "${DOCKER_USERNAME}" ] && [ -n "${DOCKER_PASSWORD}" ]; then
6+
docker login -u "${DOCKER_USERNAME}" --password-stdin <<<"$DOCKER_PASSWORD"
7+
fi
58
gcloud auth configure-docker
69
gcloud auth configure-docker us-central1-docker.pkg.dev
710
}

0 commit comments

Comments
 (0)