Skip to content

Commit

Permalink
Add docker buildx setup to release.jenkinsfile (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
iplay88keys committed Mar 1, 2023
1 parent f2df70a commit 80ea78a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions release.Jenkinsfile
Expand Up @@ -31,6 +31,7 @@ pipeline {
}
steps {
sh 'echo $HARBOR_CREDS_PSW | docker login $DOCKER_REPO -u $HARBOR_CREDS_USR --password-stdin'
sh './scripts/install_docker_buildx.sh'
sh 'make publish'
}
}
Expand All @@ -44,6 +45,7 @@ pipeline {

steps {
sh 'echo $DOCKERHUB_CREDS_PSW | docker login -u $DOCKERHUB_CREDS_USR --password-stdin'
sh './scripts/install_docker_buildx.sh'
sh 'make publish'
}
}
Expand Down
12 changes: 12 additions & 0 deletions scripts/install_docker_buildx.sh
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
if [[ ! -f "$HOME/.docker/cli-plugins/docker-buildx" ]]; then
echo "installing docker buildx..."
wget -q -O docker-buildx https://github.com/docker/buildx/releases/download/v0.9.1/buildx-v0.9.1.linux-amd64
chmod a+x docker-buildx
[[ ! -d "$HOME/.docker/cli-plugins" ]] && mkdir -p ~/.docker/cli-plugins
mv docker-buildx ~/.docker/cli-plugins
echo "successfully installed docker buildx: $(docker buildx version)"
else
echo "buildx already installed: $(docker buildx version)"
fi

0 comments on commit 80ea78a

Please sign in to comment.