Skip to content

Commit

Permalink
fix(commit_check)_: use proper base branch
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-sirotin committed Aug 12, 2024
1 parent af0be7e commit c22936f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions _assets/ci/Jenkinsfile.tests
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ pipeline {
}

environment {
PLATFORM = 'tests'
DB_CONT = "status-go-test-db-${env.EXECUTOR_NUMBER.toInteger() + 1}"
DB_PORT = "${5432 + env.EXECUTOR_NUMBER.toInteger()}"
TMPDIR = "${WORKSPACE_TMP}"
GOPATH = "${WORKSPACE_TMP}/go"
GOCACHE = "${WORKSPACE_TMP}/gocache"
PATH = "${PATH}:${GOPATH}/bin"
REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go"
PLATFORM = 'tests'
DB_CONT = "status-go-test-db-${env.EXECUTOR_NUMBER.toInteger() + 1}"
DB_PORT = "${5432 + env.EXECUTOR_NUMBER.toInteger()}"
TMPDIR = "${WORKSPACE_TMP}"
GOPATH = "${WORKSPACE_TMP}/go"
GOCACHE = "${WORKSPACE_TMP}/gocache"
PATH = "${PATH}:${GOPATH}/bin"
REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go"
BASE_BRANCH = "${env.CHANGE_TARGET}"

/* Hack-fix for params not being set in env on first job run. */
UNIT_TEST_FAILFAST = "${params.UNIT_TEST_FAILFAST}"
Expand Down Expand Up @@ -94,6 +95,9 @@ pipeline {
}

stage('Commit') {
environment {
BASE_BRANCH = "${env.BASE_BRANCH}"
}
when { // https://github.com/status-im/status-go/issues/4993#issuecomment-2022685544
expression { !isTestNightlyJob() }
}
Expand Down
4 changes: 2 additions & 2 deletions _assets/scripts/commit_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

parse_commits() {
start_commit=${1:-origin/develop}
start_commit=${1:-origin/${BASE_BRANCH}}
end_commit=${2:-HEAD}
is_breaking_change=false

Expand All @@ -27,4 +27,4 @@ parse_commits() {
echo "$is_breaking_change"
}

parse_commits
parse_commits "$@"

0 comments on commit c22936f

Please sign in to comment.