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/'
|
||||
IMAGE = 'tatort-app'
|
||||
USER = 'jared'
|
||||
TOKEN = credentials('74a7c9bb-c80f-4699-ab0e-f98fb2f9a8e6')
|
||||
TOKEN = credentials('c661e484bb4f032f8a0a5b02cda6f3344ca584b5')
|
||||
}
|
||||
|
||||
stages {
|
||||
@@ -36,24 +36,22 @@ pipeline {
|
||||
// }
|
||||
// }
|
||||
|
||||
stage('Manuelles Containerisieren') {
|
||||
steps {
|
||||
input message: 'Jetzt manuell freigeben für Deployment?', submitter: 'admin'
|
||||
sh 'docker build -t tatort-app .'
|
||||
sh 'docker image ls'
|
||||
}
|
||||
}
|
||||
// stage('Manuelles Containerisieren') {
|
||||
// steps {
|
||||
// input message: 'Jetzt manuell freigeben für Deployment?', submitter: 'admin'
|
||||
// sh 'docker build -t tatort-app .'
|
||||
// sh 'docker image ls'
|
||||
// }
|
||||
// }
|
||||
|
||||
stage('Push image in gitea registry') {
|
||||
steps {
|
||||
sh """
|
||||
echo "${TOKEN}" | docker login ${REGISTRY} -u "${USER}" --password-stdin
|
||||
docker push ${REGISTRY}/-/${IMAGE}:latest
|
||||
docker logout ${REGISTRY}
|
||||
"""
|
||||
docker.withRegistry(${ REGISTRY }, 'docker-login') {
|
||||
docker.build(${ IMAGE }).push('latest')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
|
||||
Reference in New Issue
Block a user