Fixing issues with dist path
This commit is contained in:
10
openshift/dev/Jenkinsfile
vendored
10
openshift/dev/Jenkinsfile
vendored
@@ -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}")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user