From 88fc38a5dd018702412b6ac374a9a1f9c43fe8e1 Mon Sep 17 00:00:00 2001 From: Francia Csaba Date: Wed, 20 Dec 2023 12:24:27 +0100 Subject: [PATCH] Install docker stage --- Jenkinsfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d2cd8ce..93d48a7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,10 +46,16 @@ pipeline { sh 'python -m twine upload --skip-existing --verbose --repository-url $TWINE_REPO_URL --username $GITEA_CREDS_USR --password $GITEA_CREDS_PSW ./dist/*' } } + stage('Install docker') { + steps { + echo 'Installing docker' + sh 'curl -fsSl https://get.docker.com | sh' + } + } stage('Build docker image') { steps { echo 'Building image' - script{ + script { docker.build("${OWNER}/${IMAGE_NAME}:${TAG}") } } @@ -57,7 +63,7 @@ pipeline { stage('Push image to container registry') { steps { echo 'Pushing image to registry' - script{ + script { docker.withRegistry(REGISTRY_URL, GITEA_CREDS){ docker.image("${OWNER}/${IMAGE_NAME}:${TAG}").push() }