schedulord-frontend/Jenkinsfile

48 lines
974 B
Plaintext
Raw Normal View History

2022-06-08 17:35:09 +00:00
pipeline {
agent none
2022-06-09 08:38:34 +00:00
stages {
2022-06-09 08:38:34 +00:00
stage('Install') {
steps {
2022-06-09 08:38:34 +00:00
sh 'npm install'
}
}
2022-06-09 08:38:34 +00:00
stage('Test') {
parallel {
stage('Static code analysis') {
steps {
sh 'npm run-script lint'
}
}
stage('Unit tests') {
steps {
sh 'npm run-script test'
}
}
}
}
2022-06-09 08:38:34 +00:00
stage('Build') {
steps {
2022-06-09 08:38:34 +00:00
sh 'npm run-script build'
}
2022-06-09 08:38:34 +00:00
stash includes: 'dist/', name: 'dist'
}
2022-06-09 08:38:34 +00:00
stage('Build Docker Image') {
2022-06-09 08:20:46 +00:00
agent any
2022-06-09 08:38:34 +00:00
// environment {
// DOCKER_PUSH = credentials('docker_push')
// }
2022-06-09 08:06:50 +00:00
steps {
2022-06-09 08:20:46 +00:00
unstash 'dist'
2022-06-09 08:38:34 +00:00
// sh 'docker build -t $DOCKER_PUSH_URL/frontend .'
sh 'docker build .'
// sh 'docker login -u $DOCKER_PUSH_USR -p $DOCKER_PUSH_PSW $DOCKER_PUSH_URL'
// sh 'docker push $DOCKER_PUSH_URL/frontend'
2022-06-09 08:06:50 +00:00
}
}
}
}