Merge branch 'development' into f034_sqlite_database
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:
44
Jenkinsfile
vendored
44
Jenkinsfile
vendored
@@ -1,7 +1,8 @@
|
|||||||
/* groovylint-disable-next-line UnusedVariable */
|
/* groovylint-disable-next-line UnusedVariable */
|
||||||
@Library('InnoHub-Library') _
|
@Library('InnoHub-Library') _
|
||||||
|
|
||||||
Boolean didRun = false
|
def didRun = false
|
||||||
|
def versionTag = 'null'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
@@ -31,6 +32,14 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
stage('Set Version Tag') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
versionTag = generateVersionTag(params.GIT_REF)
|
||||||
|
echo "[INFO] Using VERSION_TAG: ${versionTag}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Validate Repository') {
|
stage('Validate Repository') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
@@ -72,11 +81,36 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
didRun = true
|
def imageName = "gitea.innovation-hub-niedersachsen.de/innohub/tatort-dev"
|
||||||
def tag = "innohub/tatort-dev:0.${env.BUILD_ID}"
|
|
||||||
docker.withRegistry('https://gitea.innovation-hub-niedersachsen.de', 'JenkinsGitea') {
|
docker.withRegistry(REGISTRY, 'JenkinsGitea') {
|
||||||
docker.build(tag, '-f Dockerfile.dev .').push('latest')
|
def img = docker.build("${imageName}:${versionTag}", '-f Dockerfile.dev .')
|
||||||
|
img.push()
|
||||||
|
img.push('latest')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
didRun = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Update Helm Chart Repository') {
|
||||||
|
when {
|
||||||
|
branch 'development'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
updateHelmChart([
|
||||||
|
tag: versionTag,
|
||||||
|
repoUrl: 'gitea.innovation-hub-niedersachsen.de/innohub/charts.git',
|
||||||
|
chartPath: 'tatort-dev/tatort',
|
||||||
|
chartName: 'tatort',
|
||||||
|
imageRepo: 'gitea.innovation-hub-niedersachsen.de/innohub/tatort-dev',
|
||||||
|
credentialsId: 'JenkinsGitea',
|
||||||
|
branch: 'main'
|
||||||
|
])
|
||||||
|
|
||||||
|
didRun = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user