Always use SSH checkouts in test jobs
This allows us to bypass Github rate-limits on anonymous checkouts.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Change-Id: I353ef36a955e29b9d7c06cad1e77755f8ddceed0
diff --git a/mbed-tls-restricted-pr-ci-testing.yaml b/mbed-tls-restricted-pr-ci-testing.yaml
index b05b97b..bbcfc9d 100644
--- a/mbed-tls-restricted-pr-ci-testing.yaml
+++ b/mbed-tls-restricted-pr-ci-testing.yaml
@@ -13,9 +13,15 @@
<name>mbedtls-test</name>
<retriever class="org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever">
<scm class="org.jenkinsci.plugins.github_branch_source.GitHubSCMSource" plugin="github-branch-source@2.9.1">
+ <credentialsId>mbedtls-github-token</credentialsId>
<repoOwner>Mbed-TLS</repoOwner>
<repository>mbedtls-test</repository>
<repositoryUrl>https://github.com/Mbed-TLS/mbedtls-test.git</repositoryUrl>
+ <traits>
+ <org.jenkinsci.plugins.github__branch__source.SSHCheckoutTrait>
+ <credentialsId>mbedtls-github-ssh</credentialsId>
+ </org.jenkinsci.plugins.github__branch__source.SSHCheckoutTrait>
+ </traits>
</scm>
</retriever>
<defaultVersion>staging/pr-ci-testing</defaultVersion>
@@ -43,7 +49,7 @@
disable: false
recursive: true
tracking: false
- parent-credentials: false
+ parent-credentials: true
ssh-checkout:
credentials: mbedtls-github-ssh
- github:
@@ -65,6 +71,6 @@
disable: false
recursive: true
tracking: false
- parent-credentials: false
+ parent-credentials: true
ssh-checkout:
credentials: mbedtls-github-ssh
diff --git a/mbed-tls-restricted-pr-test-parametrized.yaml b/mbed-tls-restricted-pr-test-parametrized.yaml
index 6c8ddfb..b3cee7e 100644
--- a/mbed-tls-restricted-pr-test-parametrized.yaml
+++ b/mbed-tls-restricted-pr-test-parametrized.yaml
@@ -36,7 +36,7 @@
name: MBED_CRYPTO_BRANCH
trim: 'false'
- string:
- default: https://github.com/ARMmbed/mbed-os.git
+ default: ssh://git@github.com/ARMmbed/mbed-os.git
description: Enter the Mbed OS repo or fork
name: MBED_OS_REPO
trim: 'false'
@@ -49,7 +49,7 @@
name: MBED_OS_BRANCH
trim: 'false'
- string:
- default: https://github.com/ARMmbed/mbed-os-example-tls.git
+ default: ssh://git@github.com/ARMmbed/mbed-os-example-tls.git
description: |-
Enter the Mbed OS examples repo or fork.
@@ -116,7 +116,8 @@
- git:
branches:
- ${TEST_BRANCH}
- url: https://github.com/Mbed-TLS/mbedtls-test.git
+ credentials-id: mbedtls-github-ssh
+ url: ssh://git@github.com/Mbed-TLS/mbedtls-test.git
script-path: vars/mbedtls-pr-test-Jenkinsfile
project-type: pipeline
properties:
diff --git a/mbedtls-dockerfile-builder.yaml b/mbedtls-dockerfile-builder.yaml
index 1741ec8..2f614eb 100644
--- a/mbedtls-dockerfile-builder.yaml
+++ b/mbedtls-dockerfile-builder.yaml
@@ -11,9 +11,10 @@
checkout([
scm: [
$class: 'GitSCM',
- userRemoteConfigs: [
- [url: MBED_TLS_TEST_REPO]
- ],
+ userRemoteConfigs: [[
+ url: MBED_TLS_TEST_REPO,
+ credentialsId: mbedtls-github-ssh
+ ]],
branches: [[name: MBED_TLS_TEST_BRANCH]],
extensions: [
[$class: 'CloneOption', timeout: 60],
@@ -72,7 +73,7 @@
name: mbedtls-dockerfile-builder
parameters:
- string:
- default: https://github.com/Mbed-TLS/mbedtls-test.git
+ default: ssh://git@github.com/Mbed-TLS/mbedtls-test.git
description: Enter mbed TLS test repo/fork
name: MBED_TLS_TEST_REPO
trim: 'false'
diff --git a/mbedtls-release-ci-testing.yaml b/mbedtls-release-ci-testing.yaml
index 24df334..359d2fc 100644
--- a/mbedtls-release-ci-testing.yaml
+++ b/mbedtls-release-ci-testing.yaml
@@ -5,7 +5,7 @@
name: mbedtls-release-ci-testing
parameters:
- string:
- default: https://github.com/Mbed-TLS/mbedtls.git
+ default: ssh://git@github.com/Mbed-TLS/mbedtls.git
description: Enter mbed TLS repo/fork
name: MBED_TLS_REPO
trim: 'true'
@@ -67,7 +67,7 @@
name: MBED_CRYPTO_BRANCH
trim: 'true'
- string:
- default: https://github.com/ARMmbed/mbed-os.git
+ default: ssh://git@github.com/ARMmbed/mbed-os.git
description: Enter the Mbed OS repo or fork
name: MBED_OS_REPO
trim: 'true'
@@ -80,7 +80,7 @@
name: MBED_OS_BRANCH
trim: 'true'
- string:
- default: https://github.com/ARMmbed/mbed-os-example-tls.git
+ default: ssh://git@github.com/ARMmbed/mbed-os-example-tls.git
description: |-
Enter the Mbed OS examples repo or fork.
@@ -122,7 +122,8 @@
- git:
branches:
- ${TEST_BRANCH}
- url: https://github.com/Mbed-TLS/mbedtls-test.git
+ credentials-id: mbedtls-github-ssh
+ url: ssh://git@github.com/Mbed-TLS/mbedtls-test.git
script-path: vars/mbedtls-release-Jenkinsfile
project-type: pipeline
properties: