fixed push image job
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
This commit is contained in:
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
@@ -10,7 +10,7 @@ pipeline {
|
|||||||
REGISTRY = 'https://gitea.innovation-hub-niedersachsen.de/'
|
REGISTRY = 'https://gitea.innovation-hub-niedersachsen.de/'
|
||||||
IMAGE = 'tatort-app'
|
IMAGE = 'tatort-app'
|
||||||
USER = 'jared'
|
USER = 'jared'
|
||||||
TOKEN = credentials('74a7c9bb-c80f-4699-ab0e-f98fb2f9a8e6')
|
TOKEN = credentials('c661e484bb4f032f8a0a5b02cda6f3344ca584b5')
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
@@ -36,24 +36,22 @@ pipeline {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
stage('Manuelles Containerisieren') {
|
// stage('Manuelles Containerisieren') {
|
||||||
steps {
|
// steps {
|
||||||
input message: 'Jetzt manuell freigeben für Deployment?', submitter: 'admin'
|
// input message: 'Jetzt manuell freigeben für Deployment?', submitter: 'admin'
|
||||||
sh 'docker build -t tatort-app .'
|
// sh 'docker build -t tatort-app .'
|
||||||
sh 'docker image ls'
|
// sh 'docker image ls'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
stage('Push image in gitea registry') {
|
stage('Push image in gitea registry') {
|
||||||
steps {
|
steps {
|
||||||
sh """
|
docker.withRegistry(${ REGISTRY }, 'docker-login') {
|
||||||
echo "${TOKEN}" | docker login ${REGISTRY} -u "${USER}" --password-stdin
|
docker.build(${ IMAGE }).push('latest')
|
||||||
docker push ${REGISTRY}/-/${IMAGE}:latest
|
|
||||||
docker logout ${REGISTRY}
|
|
||||||
"""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
|
|||||||
Reference in New Issue
Block a user