mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-02-05 13:25:19 +02:00
parent
de465f2e20
commit
da0935c0e5
@ -55,7 +55,7 @@ dockerExecute(
|
||||
sidecarImage: 'selenium/standalone-chrome',
|
||||
sidecarName: 'selenium',
|
||||
) {
|
||||
git url: 'https://github.wdf.sap.corp/XXXXX/WebDriverIOTest.git'
|
||||
git url: 'https://github.com/XXXXX/WebDriverIOTest.git'
|
||||
sh '''npm install
|
||||
node index.js
|
||||
'''
|
||||
|
@ -10,7 +10,7 @@ none
|
||||
|
||||
```groovy
|
||||
seleniumExecuteTests (script: this) {
|
||||
git url: 'https://github.wdf.sap.corp/xxxxx/WebDriverIOTest.git'
|
||||
git url: 'https://github.com/xxxxx/WebDriverIOTest.git'
|
||||
sh '''npm install
|
||||
node index.js'''
|
||||
}
|
||||
|
@ -46,12 +46,12 @@ class HadolintExecuteTest extends BasePiperTest {
|
||||
|
||||
@Test
|
||||
void testHadolintExecute() {
|
||||
stepRule.step.hadolintExecute(script: nullScript, juStabUtils: utils, dockerImage: 'hadolint/hadolint:latest-debian', configurationUrl: 'https://github.wdf.sap.corp/raw/SGS/Hadolint-Dockerfile/master/.hadolint.yaml')
|
||||
stepRule.step.hadolintExecute(script: nullScript, juStabUtils: utils, dockerImage: 'hadolint/hadolint:latest-debian', configurationUrl: 'https://github.com/raw/SGS/Hadolint-Dockerfile/master/.hadolint.yaml')
|
||||
assertThat(dockerExecuteRule.dockerParams.dockerImage, is('hadolint/hadolint:latest-debian'))
|
||||
assertThat(loggingRule.log, containsString("Unstash content: buildDescriptor"))
|
||||
assertThat(shellRule.shell,
|
||||
hasItems(
|
||||
"curl --fail --location --output .hadolint.yaml https://github.wdf.sap.corp/raw/SGS/Hadolint-Dockerfile/master/.hadolint.yaml",
|
||||
"curl --fail --location --output .hadolint.yaml https://github.com/raw/SGS/Hadolint-Dockerfile/master/.hadolint.yaml",
|
||||
"hadolint ./Dockerfile --config .hadolint.yaml --format checkstyle > hadolint.xml"
|
||||
)
|
||||
)
|
||||
|
@ -66,7 +66,7 @@ user3@domain.com noreply+github@domain.com'''
|
||||
def result = stepRule.step.getCulprits(
|
||||
[
|
||||
gitSSHCredentialsId: '',
|
||||
gitUrl: 'git@github.wdf.domain.com:IndustryCloudFoundation/pipeline-test-node.git',
|
||||
gitUrl: 'git@github.domain.com:IndustryCloudFoundation/pipeline-test-node.git',
|
||||
gitCommitId: 'f0973368a35a2b973612acb86f932c61f2635f6e'
|
||||
],
|
||||
'master',
|
||||
@ -84,7 +84,7 @@ user3@domain.com noreply+github@domain.com'''
|
||||
stepRule.step.getCulprits(
|
||||
[
|
||||
gitSSHCredentialsId: '',
|
||||
gitUrl: 'git@github.wdf.domain.com:IndustryCloudFoundation/pipeline-test-node.git',
|
||||
gitUrl: 'git@github.domain.com:IndustryCloudFoundation/pipeline-test-node.git',
|
||||
gitCommitId: ''
|
||||
],
|
||||
'master',
|
||||
@ -101,7 +101,7 @@ user3@domain.com noreply+github@domain.com'''
|
||||
stepRule.step.getCulprits(
|
||||
[
|
||||
gitSSHCredentialsId: '',
|
||||
gitUrl: 'git@github.wdf.domain.com:IndustryCloudFoundation/pipeline-test-node.git',
|
||||
gitUrl: 'git@github.domain.com:IndustryCloudFoundation/pipeline-test-node.git',
|
||||
gitCommitId: null
|
||||
],
|
||||
'master',
|
||||
@ -118,7 +118,7 @@ user3@domain.com noreply+github@domain.com'''
|
||||
stepRule.step.getCulprits(
|
||||
[
|
||||
gitSSHCredentialsId: '',
|
||||
gitUrl: 'git@github.wdf.domain.com:IndustryCloudFoundation/pipeline-test-node.git',
|
||||
gitUrl: 'git@github.domain.com:IndustryCloudFoundation/pipeline-test-node.git',
|
||||
gitCommitId: ''
|
||||
],
|
||||
null,
|
||||
@ -135,7 +135,7 @@ user3@domain.com noreply+github@domain.com'''
|
||||
displayName: 'testDisplayName',
|
||||
result: 'FAILURE',
|
||||
rawBuild: [
|
||||
getLog: { cnt -> return ['Setting http proxy: proxy.wdf.domain.com:8080',
|
||||
getLog: { cnt -> return ['Setting http proxy: proxy.domain.com:8080',
|
||||
' > git fetch --no-tags --progress https://github.com/SAP/jenkins-library.git +refs/heads/*:refs/remotes/origin/*',
|
||||
'Checking out Revision myUniqueCommitId (master)',
|
||||
' > git config core.sparsecheckout # timeout=10',
|
||||
@ -165,7 +165,7 @@ user3@domain.com noreply+github@domain.com'''
|
||||
stepRule.step.mailSendNotification(
|
||||
script: nullScript,
|
||||
notifyCulprits: false,
|
||||
gitUrl: 'git@github.wdf.domain.com:IndustryCloudFoundation/pipeline-test-node.git'
|
||||
gitUrl: 'git@github.domain.com:IndustryCloudFoundation/pipeline-test-node.git'
|
||||
)
|
||||
// asserts
|
||||
assertThat(emailParameters.to, is('piper@domain.com'))
|
||||
@ -199,7 +199,7 @@ user3@domain.com noreply+github@domain.com'''
|
||||
script: nullScript,
|
||||
gitCommitId: 'abcd1234',
|
||||
//notifyCulprits: true,
|
||||
gitUrl: 'git@github.wdf.domain.com:IndustryCloudFoundation/pipeline-test-node.git'
|
||||
gitUrl: 'git@github.domain.com:IndustryCloudFoundation/pipeline-test-node.git'
|
||||
)
|
||||
// asserts
|
||||
assertThat(credentials, hasItem('myCredentialsId'))
|
||||
@ -228,7 +228,7 @@ user3@domain.com noreply+github@domain.com'''
|
||||
stepRule.step.mailSendNotification(
|
||||
script: nullScript,
|
||||
gitCommitId: 'abcd1234',
|
||||
gitUrl: 'git@github.wdf.domain.com:IndustryCloudFoundation/pipeline-test-node.git'
|
||||
gitUrl: 'git@github.domain.com:IndustryCloudFoundation/pipeline-test-node.git'
|
||||
)
|
||||
// asserts
|
||||
assertThat(credentials, hasItem(''))
|
||||
|
@ -495,7 +495,7 @@ class WhitesourceExecuteScanTest extends BasePiperTest {
|
||||
|
||||
@Test
|
||||
void testGo() {
|
||||
nullScript.commonPipelineEnvironment.gitHttpsUrl = 'https://github.wdf.sap.corp/test/golang'
|
||||
nullScript.commonPipelineEnvironment.gitHttpsUrl = 'https://github.com/test/golang'
|
||||
|
||||
helper.registerAllowedMethod("readFile", [Map.class], {
|
||||
map ->
|
||||
@ -548,12 +548,12 @@ class WhitesourceExecuteScanTest extends BasePiperTest {
|
||||
assertThat(writeFileRule.files['./myProject/wss-unified-agent.config.7d1c90ed46c66061fc8ea45dd96e209bf767f038'], containsString('productName=testProductName'))
|
||||
assertThat(writeFileRule.files['./myProject/wss-unified-agent.config.7d1c90ed46c66061fc8ea45dd96e209bf767f038'], containsString('userKey=token-0815'))
|
||||
assertThat(writeFileRule.files['./myProject/wss-unified-agent.config.7d1c90ed46c66061fc8ea45dd96e209bf767f038'], containsString('productVersion=1'))
|
||||
assertThat(writeFileRule.files['./myProject/wss-unified-agent.config.7d1c90ed46c66061fc8ea45dd96e209bf767f038'], containsString('projectName=github.wdf.sap.corp/test/golang.myProject'))
|
||||
assertThat(writeFileRule.files['./myProject/wss-unified-agent.config.7d1c90ed46c66061fc8ea45dd96e209bf767f038'], containsString('projectName=github.com/test/golang.myProject'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGoDefaults() {
|
||||
nullScript.commonPipelineEnvironment.gitHttpsUrl = 'https://github.wdf.sap.corp/test/golang'
|
||||
nullScript.commonPipelineEnvironment.gitHttpsUrl = 'https://github.com/test/golang'
|
||||
|
||||
helper.registerAllowedMethod("readFile", [Map.class], {
|
||||
map ->
|
||||
@ -605,7 +605,7 @@ class WhitesourceExecuteScanTest extends BasePiperTest {
|
||||
assertThat(writeFileRule.files['./wss-unified-agent.config.d3aa80454919391024374ba46b4df082d15ab9a3'], containsString('productName=testProductName'))
|
||||
assertThat(writeFileRule.files['./wss-unified-agent.config.d3aa80454919391024374ba46b4df082d15ab9a3'], containsString('userKey=token-0815'))
|
||||
assertThat(writeFileRule.files['./wss-unified-agent.config.d3aa80454919391024374ba46b4df082d15ab9a3'], containsString('productVersion=1'))
|
||||
assertThat(writeFileRule.files['./wss-unified-agent.config.d3aa80454919391024374ba46b4df082d15ab9a3'], containsString('projectName=github.wdf.sap.corp/test/golang'))
|
||||
assertThat(writeFileRule.files['./wss-unified-agent.config.d3aa80454919391024374ba46b4df082d15ab9a3'], containsString('projectName=github.com/test/golang'))
|
||||
}
|
||||
|
||||
|
||||
|
@ -220,10 +220,10 @@ class DescriptorUtilsTest extends BasePiperTest {
|
||||
return null
|
||||
})
|
||||
|
||||
def gav = descriptorUtils.getGoGAV('./myProject/Gopkg.toml', new URI('https://github.wdf.sap.corp/test/golang'))
|
||||
def gav = descriptorUtils.getGoGAV('./myProject/Gopkg.toml', new URI('https://github.com/test/golang'))
|
||||
|
||||
assertEquals('', gav.group)
|
||||
assertEquals('github.wdf.sap.corp/test/golang.myProject', gav.artifact)
|
||||
assertEquals('github.com/test/golang.myProject', gav.artifact)
|
||||
assertEquals('1.2.3', gav.version)
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class WhitesourceRepositoryTest extends BasePiperTest {
|
||||
|
||||
@Before
|
||||
void init() throws Exception {
|
||||
nullScript.env['HTTP_PROXY'] = "http://proxy.wdf.sap.corp:8080"
|
||||
nullScript.env['HTTP_PROXY'] = "http://proxy.org:8080"
|
||||
|
||||
repository = new WhitesourceRepository(nullScript, [whitesource: [serviceUrl: "http://some.host.whitesource.com/api/"]])
|
||||
LibraryLoadingTestExecutionListener.prepareObjectInterceptors(repository)
|
||||
@ -253,7 +253,7 @@ class WhitesourceRepositoryTest extends BasePiperTest {
|
||||
contentType: 'APPLICATION_JSON',
|
||||
requestBody: requestBody,
|
||||
quiet : false,
|
||||
proxy : "http://proxy.wdf.sap.corp:8080"
|
||||
proxy : "http://proxy.org:8080"
|
||||
]
|
||||
))
|
||||
}
|
||||
@ -278,7 +278,7 @@ class WhitesourceRepositoryTest extends BasePiperTest {
|
||||
contentType: 'APPLICATION_JSON',
|
||||
requestBody: requestBody,
|
||||
quiet : false,
|
||||
proxy : "http://proxy.wdf.sap.corp:8080",
|
||||
proxy : "http://proxy.org:8080",
|
||||
userKey : "4711"
|
||||
]
|
||||
))
|
||||
@ -286,7 +286,7 @@ class WhitesourceRepositoryTest extends BasePiperTest {
|
||||
|
||||
@Test
|
||||
void testHttpWhitesourceInternalCallUserKey() {
|
||||
def config = [whitesource: [serviceUrl: "http://mo-323123123.sap.corp/some", userKey: "4711"], verbose: false]
|
||||
def config = [whitesource: [serviceUrl: "http://test.org/some", userKey: "4711"], verbose: false]
|
||||
def requestBody = "{ \"someJson\" : { \"someObject\" : \"abcdef\" } }"
|
||||
|
||||
def requestParams
|
||||
@ -328,7 +328,7 @@ class WhitesourceRepositoryTest extends BasePiperTest {
|
||||
|
||||
@Test
|
||||
void testFetchReportForProduct() {
|
||||
repository.config.putAll([whitesource: [serviceUrl: "http://mo-323123123.sap.corp/some", productToken: "4712", userKey: "4711"], verbose: true])
|
||||
repository.config.putAll([whitesource: [serviceUrl: "http://test.org/some", productToken: "4712", userKey: "4711"], verbose: true])
|
||||
def requestBody = "{ \"requestType\": \"getProductRiskReport\", \"productToken\": \"${repository.config.whitesource.productToken}\" }"
|
||||
|
||||
def requestParams
|
||||
|
@ -93,7 +93,7 @@ class PiperPipelineStageInitTest extends BasePiperTest {
|
||||
@Test
|
||||
void testInitBuildToolDoesNotMatchProject() {
|
||||
|
||||
thrown.expectMessage('[piperPipelineStageInit] buildTool configuration \'npm\' does not fit to your project, please set buildTool as genereal setting in your .pipeline/config.yml correctly, see also https://github.wdf.sap.corp/pages/ContinuousDelivery/piper-doc/configuration/')
|
||||
thrown.expectMessage('[piperPipelineStageInit] buildTool configuration \'npm\' does not fit to your project, please set buildTool as genereal setting in your .pipeline/config.yml correctly, see also https://sap.github.io/jenkins-library/configuration/')
|
||||
jsr.step.piperPipelineStageInit(
|
||||
script: nullScript,
|
||||
juStabUtils: utils,
|
||||
|
@ -1,7 +1,7 @@
|
||||
package: github.wdf.sap.corp/TestOrg/GolangTest
|
||||
package: github.com/TestOrg/GolangTest
|
||||
import:
|
||||
- package: github.com/julienschmidt/httprouter
|
||||
version: ^1.1.0
|
||||
- package: github.com/tebeka/go2xunit
|
||||
version: ^1.4.4
|
||||
- package: github.wdf.sap.corp/dtxmake-acceptance/golang-sample
|
||||
- package: github.com/dtxmake-acceptance/golang-sample
|
||||
|
@ -6,7 +6,7 @@ setup(
|
||||
|
||||
description='This is a python package to handle some ci-connect payload parts',
|
||||
|
||||
url='https://github.wdf.sap.corp/sap-production/py_connect',
|
||||
url='https://github.com/sap-production/py_connect',
|
||||
|
||||
# Author details
|
||||
author='Some Author',
|
||||
|
@ -121,7 +121,7 @@ private void checkBuildTool(config) {
|
||||
break
|
||||
}
|
||||
if (buildDescriptorPattern && !findFiles(glob: buildDescriptorPattern)) {
|
||||
error "[${STEP_NAME}] buildTool configuration '${config.buildTool}' does not fit to your project, please set buildTool as genereal setting in your .pipeline/config.yml correctly, see also https://github.wdf.sap.corp/pages/ContinuousDelivery/piper-doc/configuration/"
|
||||
error "[${STEP_NAME}] buildTool configuration '${config.buildTool}' does not fit to your project, please set buildTool as genereal setting in your .pipeline/config.yml correctly, see also https://sap.github.io/jenkins-library/configuration/"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user