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