1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-10-30 23:57:50 +02:00

Fix integration tests on master (#1440)

This commit is contained in:
Daniel Kurzynski
2020-04-22 16:41:43 +02:00
committed by GitHub
parent 76d24e560e
commit 168b82b92c
2 changed files with 7 additions and 3 deletions

View File

@@ -22,11 +22,14 @@ jobs:
run: sudo apt-get update && sudo apt-get install groovy -y
- name: setup git
run: git config --global user.email "piper-testing-bot@example.com" && git config --global user.name "piper-testing-bot"
- name: get branch name
id: branchname
run: echo "::set-output name=branchname::$(echo ${GITHUB_REF#refs/heads/})"
- name: run consumer tests
run: cd consumer-test && groovy consumerTestController.groovy
env:
REPOSITORY_UNDER_TEST: ${{ github.repository }}
BRANCH_NAME: ${GITHUB_REF#refs/heads/}
BRANCH_NAME: ${{ steps.branchname.outputs.branchname }}
BUILD_WEB_URL: https://github.com/SAP/jenkins-library/actions/runs/${{ github.run_id }}
INTEGRATION_TEST_VOTING_TOKEN: ${{ secrets.INTEGRATION_TEST_VOTING_TOKEN }}
CX_INFRA_IT_CF_USERNAME: ${{ secrets.CX_INFRA_IT_CF_USERNAME }}

View File

@@ -10,6 +10,7 @@ WORKSPACES_ROOT = 'workspaces'
TEST_CASES_DIR = 'testCases'
LIBRARY_VERSION_UNDER_TEST = "git log --format=%H -n 1".execute().text.trim()
REPOSITORY_UNDER_TEST = System.getenv('REPOSITORY_UNDER_TEST') ?: System.getenv('TRAVIS_REPO_SLUG') ?: 'SAP/jenkins-library'
BRANCH_NAME = System.getenv('TRAVIS_BRANCH') ?: System.getenv('BRANCH_NAME')
EXCLUDED_FROM_CONSUMER_TESTING_REGEXES = [
/^documentation\/.*$/,
@@ -17,6 +18,7 @@ EXCLUDED_FROM_CONSUMER_TESTING_REGEXES = [
/^test\/.*$/
]
println "Running tests for repository: ${REPOSITORY_UNDER_TEST}, branch: ${BRANCH_NAME}, commit: ${LIBRARY_VERSION_UNDER_TEST}"
newEmptyDir(WORKSPACES_ROOT)
TestRunnerThread.workspacesRootDir = WORKSPACES_ROOT
@@ -192,8 +194,7 @@ def notifyGithub(state, description) {
}
def changeDoesNotNeedConsumerTesting() {
def branchName = System.getenv('TRAVIS_BRANCH') ?: System.getenv('BRANCH_NAME')
if (branchName == 'master') {
if (BRANCH_NAME == 'master') {
return false
}