Some checks failed
arbeitszeitmessung/pipeline/head There was a failure building this commit
42 lines
968 B
Groovy
42 lines
968 B
Groovy
pipeline {
|
|
environment {
|
|
DOCKER_USERNAME = 'jenkins'
|
|
DOCKER_PASSWORD = credentials('gitea_jenkins')
|
|
SONAR_TOKEN = credentials('sonarcube_token')
|
|
}
|
|
|
|
agent any
|
|
|
|
stages {
|
|
stage('Test') {
|
|
agent {
|
|
docker {
|
|
image 'golang:alpine'
|
|
}
|
|
}
|
|
steps {
|
|
sh 'cd Backend && go mod download && go mod verify'
|
|
sh 'make test'
|
|
}
|
|
}
|
|
stage('SonarCube Analysis') {
|
|
steps {
|
|
sh 'make scan'
|
|
}
|
|
}
|
|
}
|
|
stage('Building image arbeitszeit-backend') {
|
|
when {
|
|
anyOf {
|
|
changeset 'Jenkinsfile'
|
|
changeset 'Makefile'
|
|
changeset 'Backend/**'
|
|
}
|
|
}
|
|
steps {
|
|
sh 'make backend'
|
|
}
|
|
}
|
|
}
|
|
}
|