diff --git a/Jenkinsfile b/Jenkinsfile index 295900b..02768f9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ parameters { - string(name: 'branch', defaultValue: 'refs/heads/testing', description: 'Branch ref from webhook') + string(name: 'branch', defaultValue: 'refs/heads/main', description: 'Branch ref from webhook') string(name: 'oldrev', defaultValue: '', description: 'old rev') string(name: 'newrev', defaultValue: '', description: 'new rev') @@ -235,14 +235,8 @@ } } - if (!skipInstall) { - sh """ - yarn set version from sources - yarn - """ - } else { - echo "No dependency changes detected. Skipping yarn install." - } + sh "yarn set version from sources" + sh "yarn" sh "yarn combine:css" } diff --git a/build b/build deleted file mode 100755 index 7bf71ef..0000000 --- a/build +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -export $(grep -v '^#' .env | grep -E '^(NODE_ENV)' | xargs) -GIT_REPO="ssh://git.jasonpoage.vpn:29418/jason/express-blog.git" -GIT_COMMIT=$(git rev-parse origin/dev) - -docker build --build-arg GIT_REPO="$GIT_REPO" --build-arg GIT_COMMIT="$GIT_COMMIT" --build-arg NODE_ENV="$NODE_ENV" -t express-blog . diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..7bf71ef --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash +export $(grep -v '^#' .env | grep -E '^(NODE_ENV)' | xargs) +GIT_REPO="ssh://git.jasonpoage.vpn:29418/jason/express-blog.git" +GIT_COMMIT=$(git rev-parse origin/dev) + +docker build --build-arg GIT_REPO="$GIT_REPO" --build-arg GIT_COMMIT="$GIT_COMMIT" --build-arg NODE_ENV="$NODE_ENV" -t express-blog .