Jenkinsfile edited online with Bitbucket

This commit is contained in:
Gustav Ek
2021-05-06 10:17:37 +02:00
parent 6a573d0e87
commit 1c18b46fa2

View File

@@ -65,11 +65,9 @@ pipeline {
# Try to get the file from cache
cp ${CACHE_DIRECTORY}/$(cat hashed.pkg-lock) node_modules.tar.gz 2> /dev/null
# 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
# If we did not find the cached node_modules, install from the lock