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 u1project = "${U1_NAMESPACE}"
|
||||||
def t1project = "${T1_NAMESPACE}"
|
def t1project = "${T1_NAMESPACE}"
|
||||||
def jenkinsslave = "nodejs15-agent"
|
def jenkinsslave = "nodejs15-agent"
|
||||||
|
def dist_path = "dist/apps/dafa-web/"
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|
||||||
@@ -89,12 +90,15 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stage("Build application") {
|
stage("Build application") {
|
||||||
|
environment {
|
||||||
|
DIST_PATH = "${dist_path}"
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
echo '### Building application... ###'
|
echo '### Building application... ###'
|
||||||
|
|
||||||
sh '''
|
sh '''
|
||||||
npm run build -- --output-path=dist
|
npm run build:dafa-web
|
||||||
cp -r nginx/* dist/.
|
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
|
// 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 {
|
script {
|
||||||
openshift.withCluster() {
|
openshift.withCluster() {
|
||||||
openshift.withProject(devproject) {
|
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}")
|
openshift.tag("${ appname }:latest", "${ appname }:${BUILD_TAG}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user