Skip to content

Commit 3efd30e

Browse files
author
Robin Banbury
committed
RELENG-3462 Migrate cloud repository dependencies to GitHub
1 parent 8779a36 commit 3efd30e

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

jenkins-scripts/libs/common.groovy

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -85,34 +85,12 @@ boolean branchSupportsIDCloudReleases() {
8585
}
8686

8787
/** Revision of platform-images repo used for k8s and platform integration/perf tests. */
88-
// TODO GitHub migration remove ternary to only use githubUtils when GitHub migration is complete
89-
platformImagesRevision = scmUtils.isGitHubRepository(env.PLATFORM_IMAGES_REPOSITORY_URL)\
90-
? githubUtils.organization(scmUtils.getRepositoryOwnerName(env.PLATFORM_IMAGES_REPOSITORY_URL),
91-
githubUtils.githubAppCredentialsFromUrl(env.PLATFORM_IMAGES_REPOSITORY_URL))
92-
.repository(scmUtils.getRepoName(env.PLATFORM_IMAGES_REPOSITORY_URL))
93-
.branch(DEFAULT_PLATFORM_IMAGES_TAG)
94-
.lastCommitHash()
95-
.value()
96-
: bitbucketUtils.getLatestCommitHash(scmUtils.getRepositoryOwnerName(env.PLATFORM_IMAGES_REPOSITORY_URL),
97-
scmUtils.getRepoName(env.PLATFORM_IMAGES_REPOSITORY_URL),
98-
DEFAULT_PLATFORM_IMAGES_TAG)
99-
.trim()
88+
platformImagesRevision = platformImageUtils.getRevision(DEFAULT_PLATFORM_IMAGES_TAG)
89+
echo "Platform Images revision: ${platformImagesRevision}"
10090

10191
/** Revision of Lodestar framework used for K8s and platform integration/perf tests. */
102-
// TODO GitHub migration remove ternary to only use githubUtils when GitHub migration is complete
103-
lodestarRevision = readJSON(text: (scmUtils.isGitHubRepository(env.PLATFORM_IMAGES_REPOSITORY_URL)\
104-
? githubUtils.organization(scmUtils.getRepositoryOwnerName(env.PLATFORM_IMAGES_REPOSITORY_URL),
105-
githubUtils.githubAppCredentialsFromUrl(env.PLATFORM_IMAGES_REPOSITORY_URL))
106-
.repository(scmUtils.getRepoName(env.PLATFORM_IMAGES_REPOSITORY_URL))
107-
.readFileContent('lodestar.json', platformImagesRevision)
108-
.trim()
109-
: bitbucketUtils.readFileContent(scmUtils.getRepositoryOwnerName(env.PLATFORM_IMAGES_REPOSITORY_URL),
110-
scmUtils.getRepoName(env.PLATFORM_IMAGES_REPOSITORY_URL),
111-
platformImagesRevision,
112-
'lodestar.json')
113-
.trim())
114-
)['gitCommit']
115-
92+
lodestarRevision = platformImageUtils.getProductCommit(platformImagesRevision, 'lodestar')
93+
echo "Lodestar revision: ${lodestarRevision}"
11694

11795
def authenticateGke() {
11896
withCredentials([file(credentialsId: 'jenkins-guillotine-sa-key', variable: 'GC_KEY')]) {

0 commit comments

Comments
 (0)