fix: fixed agent docker installation
Gitea/docker-base-images/jdk14-alpine/pipeline/head There was a failure building this commit Details

amorozov 2023-04-04 20:07:59 +03:00
parent 2629247930
commit 1eb0164c99
1 changed files with 8 additions and 3 deletions

11
Jenkinsfile vendored
View File

@ -9,7 +9,7 @@ def resolveImageName(env) {
pipeline {
agent {
docker {
image 'alpinelinux/docker-cli'
image 'alpine:3.17.3'
// Mount docker socket for docker-in-docker
args '-v /var/run/docker.sock:/var/run/docker.sock'
}
@ -21,6 +21,12 @@ pipeline {
apk update && \
apk add --no-cache git
"""
sh """curl -fsSLO https://get.docker.com/builds/Linux/x86_64/docker-17.04.0-ce.tgz \
&& tar xzvf docker-17.04.0-ce.tgz \
&& mv docker/docker /usr/local/bin \
&& rm -r docker docker-17.04.0-ce.tgz"""
script {
env.IMAGE_BASE_NAME = "jdk14-alpine"
env.RELEASE_TAG_PREFIX = "release-"
@ -33,8 +39,7 @@ pipeline {
}
stage('build_docker') {
steps {
sh "which docker"
sh "/usr/bin/docker build . --tag ${resolveImageName(env)}"
sh "docker build . --tag ${resolveImageName(env)}"
}
}
stage('push_docker') {