maybe now?
Some checks failed
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit

This commit is contained in:
Jesse James Isler 2022-06-09 10:38:34 +02:00
parent a78de2fbd5
commit 0e86e99ff4

67
Jenkinsfile vendored
View File

@ -1,67 +1,46 @@
pipeline { pipeline {
agent none agent none
stages { stages {
stage('Fetch dependencies') { stage('Install') {
agent {
docker 'circleci/node:9.3-stretch-browsers'
}
steps { steps {
sh 'yarn' sh 'npm install'
stash includes: 'node_modules/', name: 'node_modules'
} }
} }
stage('Lint') {
agent { stage('Test') {
docker 'circleci/node:9.3-stretch-browsers' parallel {
} stage('Static code analysis') {
steps { steps {
unstash 'node_modules' sh 'npm run-script lint'
sh 'yarn lint'
} }
} }
stage('Unit Test') { stage('Unit tests') {
agent {
docker 'circleci/node:9.3-stretch-browsers'
}
steps { steps {
unstash 'node_modules' sh 'npm run-script test'
sh 'yarn test:ci'
junit 'reports/**/*.xml'
} }
} }
stage('E2E Test') {
agent {
docker 'circleci/node:9.3-stretch-browsers'
} }
}
stage('Build') {
steps { steps {
unstash 'node_modules' sh 'npm run-script build'
sh 'mkdir -p reports'
sh 'yarn e2e:pre-ci'
sh 'yarn e2e:ci'
sh 'yarn e2e:post-ci'
junit 'reports/**/*.xml'
} }
}
stage('Compile') {
agent {
docker 'circleci/node:9.3-stretch-browsers'
}
steps {
unstash 'node_modules'
sh 'yarn build:prod'
stash includes: 'dist/', name: 'dist' stash includes: 'dist/', name: 'dist'
} }
}
stage('Build and Push Docker Image') { stage('Build Docker Image') {
agent any agent any
environment { // environment {
DOCKER_PUSH = credentials('docker_push') // DOCKER_PUSH = credentials('docker_push')
} // }
steps { steps {
unstash 'dist' unstash 'dist'
sh 'docker build -t $DOCKER_PUSH_URL/frontend .' // sh 'docker build -t $DOCKER_PUSH_URL/frontend .'
sh 'docker login -u $DOCKER_PUSH_USR -p $DOCKER_PUSH_PSW $DOCKER_PUSH_URL' sh 'docker build .'
sh 'docker push $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'
} }
} }
} }