diff --git a/openshift/dev/Jenkinsfile b/openshift/dev/Jenkinsfile index 81bca65..427aef8 100644 --- a/openshift/dev/Jenkinsfile +++ b/openshift/dev/Jenkinsfile @@ -45,9 +45,6 @@ pipeline { mkdir -p ${CACHE_DIRECTORY} echo "_auth=${ENCODED}" >> .npmrc - node -v - npm -v - # set -x cat .npmrc @@ -99,9 +96,7 @@ pipeline { echo '### Building application... ###' sh ''' - npm run build:pega - - #cp nginx/nginx.conf ${NGINX_PATH} + npm run build:pega cp -r nginx/* ${NGINX_PATH} ''' diff --git a/openshift/prod/Jenkinsfile b/openshift/prod/Jenkinsfile index 9accded..ffc4fe2 100644 --- a/openshift/prod/Jenkinsfile +++ b/openshift/prod/Jenkinsfile @@ -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! ###' }