Jesse James Isler
da39a7fc5f
Some checks reported errors
gitea_dndsources/schedulord-frontend/pipeline/head Something is wrong with the build of this commit
Yes, jenkins will build this twice. Once the app and once for the dockerfile. Sue me
73 lines
1.5 KiB
Groovy
73 lines
1.5 KiB
Groovy
//pipeline {
|
|
// agent { dockerfile true }
|
|
// stages {
|
|
// stage('Test') {
|
|
// steps {
|
|
// echo "Build has worked!"
|
|
// }
|
|
// }
|
|
// }
|
|
//}
|
|
pipeline {
|
|
agent none
|
|
// tools {
|
|
// nodejs "815Node"
|
|
// }
|
|
// environment {
|
|
// registry = 'dockerhubusername/dockerhubusername'
|
|
// registryCredential = 'dockerhubcredentials'
|
|
// }
|
|
stages {
|
|
stage('INSTALL PACKAGES') {
|
|
agent any
|
|
steps {
|
|
sh "npm install"
|
|
}
|
|
}
|
|
stage('CODETEST') {
|
|
agent any
|
|
steps {
|
|
echo "insert your testing here"
|
|
}
|
|
}
|
|
stage('BUILD APP') {
|
|
agent any
|
|
steps {
|
|
sh "node_modules/.bin/ng build --prod"
|
|
}
|
|
}
|
|
stage('Angular frontend Karma Test') {
|
|
agent any
|
|
steps {
|
|
sh 'npm rebuild'
|
|
sh 'npm run test'
|
|
sh 'ng test'
|
|
}
|
|
}
|
|
stage("BUILD DOCKER") {
|
|
agent {
|
|
dockerfile true
|
|
}
|
|
steps {
|
|
script {
|
|
dockerImageBuild = docker.build registry + ":latest"
|
|
}
|
|
}
|
|
}
|
|
// stage("DEPLOY DOCKER") {
|
|
// steps {
|
|
// script {
|
|
// docker.withRegistry('', registryCredential) {
|
|
// dockerImageBuild.push()
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
// stage("DEPLOY & ACTIVATE") {
|
|
// steps {
|
|
// echo 'this part will differ depending on setup'
|
|
// }
|
|
// }
|
|
}
|
|
}
|