You've already forked sap-jenkins-library
							
							
				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:
		
							
								
								
									
										5
									
								
								.github/workflows/integration-tests.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/integration-tests.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -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 }} | ||||
|   | ||||
| @@ -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 | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user