Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
Added additional Infos in pull request
73 lines
1.7 KiB
Groovy
73 lines
1.7 KiB
Groovy
pipeline {
|
|
agent any
|
|
|
|
tools {
|
|
nodejs 'NodeJS-24.2.0'
|
|
}
|
|
|
|
environment {
|
|
REGISTRY = 'https://gitea.innovation-hub-niedersachsen.de/'
|
|
IMAGE = 'tatort-app'
|
|
USER = 'jared'
|
|
TOKEN = credentials('c661e484bb4f032f8a0a5b02cda6f3344ca584b5')
|
|
}
|
|
|
|
parameters {
|
|
string(name: 'REPO_NAME', defaultValue: '', description: 'Repo Name')
|
|
string(name: 'GIT_REF', defaultValue: '', description: 'Git Ref')
|
|
}
|
|
|
|
options {
|
|
buildDiscarder(
|
|
BuildHistoryManager([
|
|
[ continueAfterMatch: false, matchAtMost: 5 ],
|
|
[ actions: [ DeleteBuild() ] ]
|
|
])
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage('Install Dependencies') {
|
|
steps {
|
|
sh 'npm ci'
|
|
}
|
|
}
|
|
|
|
stage('Test & Security Audit') {
|
|
steps {
|
|
echo 'Start checking security vulnerabilities in npm packages'
|
|
sh 'npm audit'
|
|
}
|
|
}
|
|
|
|
// stage('Build') {
|
|
// when {
|
|
// branch 'development'
|
|
// }
|
|
// steps {
|
|
// sh 'npm run build'
|
|
// }
|
|
// }
|
|
|
|
// stage('Push image in gitea registry') {
|
|
// steps {
|
|
// echo 'Start Pushing'
|
|
// script {
|
|
// docker.withRegistry('https://gitea.innovation-hub-niedersachsen.de', 'JenkinsGitea') {
|
|
// docker.build('innohub/tatort-app').push('latest')
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
}
|
|
|
|
post {
|
|
success {
|
|
echo 'Pipeline erfolgreich!'
|
|
}
|
|
failure {
|
|
echo 'Pipeline fehlgeschlagen!'
|
|
}
|
|
}
|
|
}
|