fix(commit_check)_: use proper base branch (#5700)

This commit is contained in:
Igor Sirotin 2024-08-13 10:58:48 +01:00 committed by GitHub
parent be9ba7604b
commit dd443b030d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 10 deletions

View File

@ -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}"
@ -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() }
}

View File

@ -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
@ -27,4 +27,4 @@ parse_commits() {
echo "$is_breaking_change"
}
parse_commits
parse_commits "$@"