maybe now?
Some checks failed
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit
Some checks failed
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit
This commit is contained in:
parent
a78de2fbd5
commit
0e86e99ff4
67
Jenkinsfile
vendored
67
Jenkinsfile
vendored
@ -1,67 +1,46 @@
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
stages {
|
||||
stage('Fetch dependencies') {
|
||||
agent {
|
||||
docker 'circleci/node:9.3-stretch-browsers'
|
||||
}
|
||||
stage('Install') {
|
||||
steps {
|
||||
sh 'yarn'
|
||||
stash includes: 'node_modules/', name: 'node_modules'
|
||||
sh 'npm install'
|
||||
}
|
||||
}
|
||||
stage('Lint') {
|
||||
agent {
|
||||
docker 'circleci/node:9.3-stretch-browsers'
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
parallel {
|
||||
stage('Static code analysis') {
|
||||
steps {
|
||||
unstash 'node_modules'
|
||||
sh 'yarn lint'
|
||||
sh 'npm run-script lint'
|
||||
}
|
||||
}
|
||||
stage('Unit Test') {
|
||||
agent {
|
||||
docker 'circleci/node:9.3-stretch-browsers'
|
||||
}
|
||||
stage('Unit tests') {
|
||||
steps {
|
||||
unstash 'node_modules'
|
||||
sh 'yarn test:ci'
|
||||
junit 'reports/**/*.xml'
|
||||
sh 'npm run-script test'
|
||||
}
|
||||
}
|
||||
stage('E2E Test') {
|
||||
agent {
|
||||
docker 'circleci/node:9.3-stretch-browsers'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
unstash 'node_modules'
|
||||
sh 'mkdir -p reports'
|
||||
sh 'yarn e2e:pre-ci'
|
||||
sh 'yarn e2e:ci'
|
||||
sh 'yarn e2e:post-ci'
|
||||
junit 'reports/**/*.xml'
|
||||
sh 'npm run-script build'
|
||||
}
|
||||
}
|
||||
stage('Compile') {
|
||||
agent {
|
||||
docker 'circleci/node:9.3-stretch-browsers'
|
||||
}
|
||||
steps {
|
||||
unstash 'node_modules'
|
||||
sh 'yarn build:prod'
|
||||
stash includes: 'dist/', name: 'dist'
|
||||
}
|
||||
}
|
||||
stage('Build and Push Docker Image') {
|
||||
|
||||
stage('Build Docker Image') {
|
||||
agent any
|
||||
environment {
|
||||
DOCKER_PUSH = credentials('docker_push')
|
||||
}
|
||||
// environment {
|
||||
// DOCKER_PUSH = credentials('docker_push')
|
||||
// }
|
||||
steps {
|
||||
unstash 'dist'
|
||||
sh 'docker build -t $DOCKER_PUSH_URL/frontend .'
|
||||
sh 'docker login -u $DOCKER_PUSH_USR -p $DOCKER_PUSH_PSW $DOCKER_PUSH_URL'
|
||||
sh 'docker push $DOCKER_PUSH_URL/frontend'
|
||||
// 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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user