Fixing issues with dist path

This commit is contained in:
Erik Tiekstra
2021-05-03 13:36:03 +02:00
parent 3a17c843c2
commit 7af2061f77

View File

@@ -5,6 +5,7 @@ def i1project = "${I1_NAMESPACE}"
def u1project = "${U1_NAMESPACE}"
def t1project = "${T1_NAMESPACE}"
def jenkinsslave = "nodejs15-agent"
def dist_path = "dist/apps/dafa-web/"
pipeline {
@@ -89,12 +90,15 @@ pipeline {
}
stage("Build application") {
environment {
DIST_PATH = "${dist_path}"
}
steps {
echo '### Building application... ###'
sh '''
npm run build -- --output-path=dist
cp -r nginx/* dist/.
npm run build:dafa-web
cp -r nginx/* ${DIST_PATH}.
'''
// Used when testing Openshift, so that we dont need to wait for build. Also put a # before npm ci above
@@ -112,7 +116,7 @@ pipeline {
script {
openshift.withCluster() {
openshift.withProject(devproject) {
openshift.selector("bc", "${ appname }").startBuild("--from-dir=./dist", "--wait=true")
openshift.selector("bc", "${ appname }").startBuild("--from-dir=${dist_path}", "--wait=true")
openshift.tag("${ appname }:latest", "${ appname }:${BUILD_TAG}")
}
}