ci043-add-jenkins-ci #13
52
Jenkinsfile
vendored
Normal file
52
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
tools {
|
||||
nodejs 'NodeJS-24.2.0'
|
||||
}
|
||||
|
||||
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!'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user