aboutsummaryrefslogtreecommitdiff
path: root/jb-ui/Jenkinsfile
diff options
context:
space:
mode:
Diffstat (limited to 'jb-ui/Jenkinsfile')
-rw-r--r--jb-ui/Jenkinsfile30
1 files changed, 13 insertions, 17 deletions
diff --git a/jb-ui/Jenkinsfile b/jb-ui/Jenkinsfile
index 2735dc6..27a0ab9 100644
--- a/jb-ui/Jenkinsfile
+++ b/jb-ui/Jenkinsfile
@@ -7,9 +7,9 @@ pipeline {
}
environment {
- BUILD_DIR = "dist"
- JS_FILENAME = "james-billings"
- CSS_FILENAME = "james-has-style"
+ BUILD_DIR = 'dist'
+ JS_FILENAME = 'james-billings'
+ CSS_FILENAME = 'james-has-style'
}
options {
@@ -17,8 +17,7 @@ pipeline {
}
stages {
-
- stage('setup'){
+ stage('setup') {
steps {
cleanWs()
checkout scmGit(
@@ -38,31 +37,30 @@ pipeline {
credentialsId: 'amt-jb-ui-env',
variable: 'ENV_FILE_PATH')]) {
sh "cp \$ENV_FILE_PATH ${WORKSPACE}/jb-ui/.env.production"
- }
+ }
}
}
stage('pnpm.install') {
steps {
- dir("jb-ui") {
- sh "pnpm install"
+ dir('jb-ui') {
+ sh 'pnpm install'
}
}
}
stage('pnpm.test') {
steps {
- dir("jb-ui") {
- sh "pnpm run test"
+ dir('jb-ui') {
+ sh 'pnpm run test'
}
}
}
stage('pnpm.build') {
-
steps {
- dir("jb-ui") {
- sh "pnpm run build"
+ dir('jb-ui') {
+ sh 'pnpm run build'
script {
dir(env.BUILD_DIR) {
def minSize = 750 * 1024
@@ -93,7 +91,7 @@ pipeline {
expression { env.BRANCH_NAME != 'master' }
}
steps {
- dir("jb-ui") {
+ dir('jb-ui') {
script {
echo "Detected branch: ${env.BRANCH_NAME}"
def versioned_js = "${env.JS_FILENAME}-${env.BRANCH_NAME}"
@@ -106,7 +104,6 @@ pipeline {
sh "/usr/bin/rsync -avz ${WORKSPACE}/jb-ui/${env.BUILD_DIR}/ thl-cdn:/root/amt-jb-cdn/"
}
}
-
}
}
}
@@ -119,7 +116,7 @@ pipeline {
}
steps {
- dir("jb-ui") {
+ dir('jb-ui') {
script {
echo "Detected tag: ${env.TAG_NAME}"
def versioned_js = "${env.JS_FILENAME}-${env.TAG_NAME}"
@@ -132,7 +129,6 @@ pipeline {
sh "/usr/bin/rsync -avz ${WORKSPACE}/jb-ui/${env.BUILD_DIR}/ thl-cdn:/root/amt-jb-cdn/"
}
}
-
}
}
}