Updated Jenkinsfiles
This commit is contained in:
11
openshift/prod/Jenkinsfile
vendored
11
openshift/prod/Jenkinsfile
vendored
@@ -43,6 +43,7 @@ pipeline {
|
||||
CACHE_DIRECTORY=/home/jenkins/.npm/cache
|
||||
mkdir -p ${CACHE_DIRECTORY}
|
||||
echo "_auth=${ENCODED}" >> .npmrc
|
||||
|
||||
# set -x
|
||||
cat .npmrc
|
||||
|
||||
@@ -62,7 +63,7 @@ pipeline {
|
||||
# Check if we found the cached node_modules
|
||||
test -f node_modules.tar.gz
|
||||
# If we found the cached node_modules, extract the files to node_modules
|
||||
tar -zxf node_modules.tar.gz
|
||||
(test -f node_modules.tar.gz && tar -zxf node_modules.tar.gz && echo "Using cached node_modules from ${CACHE_DIRECTORY}/$(cat hashed.pkg-lock)") || echo "No cached node_modules.tar.gz found"
|
||||
# Echo to the logs stating that we are using cache
|
||||
echo "Using cached node_modules from ${CACHE_DIRECTORY}/$(cat hashed.pkg-lock)"
|
||||
) || true
|
||||
@@ -95,12 +96,8 @@ pipeline {
|
||||
steps {
|
||||
echo '### Building application... ###'
|
||||
sh '''
|
||||
npm run build:dafa -- --prod
|
||||
|
||||
cp nginx/nginx.conf ${NGINX_PATH}
|
||||
#cp -r nginx/* ${NGINX_PATH}
|
||||
|
||||
ls -la dist
|
||||
npm run build:pega -- --prod
|
||||
cp -r nginx/* ${NGINX_PATH}
|
||||
'''
|
||||
echo '### Application built! ###'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user