Skip to content

Commit

Permalink
fix(pipelines): call docker login on all pipelines
Browse files Browse the repository at this point in the history
we introdude this call ontop of the call we having in SCT code
so we won't hit the limit while pulling hydra images themselves

Fixes: scylladb/scylla-pkg#4634
  • Loading branch information
fruch committed Dec 3, 2024
1 parent 5389d67 commit 51f564e
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ pipeline {
}
steps {
script {
dockerLogin(params)
try {
sh './docker/env/hydra.sh pre-commit'
// also check the commit-messge for the rules we want
Expand Down Expand Up @@ -172,6 +173,8 @@ pipeline {
dir('scylla-cluster-tests') {
checkout scm

dockerLogin(params)

wrap([$class: 'BuildUser']) {
echo "calling createSctRunner"
timeout(time: 5, unit: 'MINUTES') {
Expand Down Expand Up @@ -225,6 +228,7 @@ pipeline {
dir(working_dir) {
checkout scm
}
dockerLogin(params)
if (sct_runner_backends.contains(backend)){
try {
wrap([$class: 'BuildUser']) {
Expand Down
1 change: 1 addition & 0 deletions vars/artifactsPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def call(Map pipelineParams) {
checkout scm
}
}
dockerLogin(params)
}
stage('Create Argus Test Run') {
catchError(stageResult: 'FAILURE') {
Expand Down
1 change: 1 addition & 0 deletions vars/byoLongevityPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def call() {

checkoutQaInternal(params)
}
dockerLogin(params)
}
}
stage('Create SCT Runner') {
Expand Down
10 changes: 10 additions & 0 deletions vars/dockerLogin.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!groovy

def call(Map params = [:]) {
withCredentials([
string(credentialsId: 'docker-hub-jenkins-user', variable: 'DOCKER_USERNAME'),
string(credentialsId: 'docker-hub-api-key', variable: 'DOCKER_PASSWORD')
]) {
sh 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD'
}
}
1 change: 1 addition & 0 deletions vars/jepsenPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def call(Map pipelineParams) {
checkoutQaInternal(params)
}
}
dockerLogin(params)
}
}
stage('Create Argus Test Run') {
Expand Down
1 change: 1 addition & 0 deletions vars/longevityPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def call(Map pipelineParams) {
checkoutQaInternal(params)
}
}
dockerLogin(params)
}
}
stage('Create Argus Test Run') {
Expand Down
1 change: 1 addition & 0 deletions vars/managerPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def call(Map pipelineParams) {
checkout scm
checkoutQaInternal(params)
}
dockerLogin(params)
}
}
stage('Create Argus Test Run') {
Expand Down
2 changes: 2 additions & 0 deletions vars/perfRegressionParallelPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def call(Map pipelineParams) {
loadEnvFromString(params.extra_environment_variables)
dir('scylla-cluster-tests') {
checkout scm
dockerLogin(params)
(testDuration, testRunTimeout, runnerTimeout, collectLogsTimeout, resourceCleanupTimeout) = getJobTimeouts(params, builder.region)
base_versions_list = params.base_versions.contains('.') ? params.base_versions.split('\\,') : []
def new_repo = params.new_scylla_repo
Expand Down Expand Up @@ -265,6 +266,7 @@ def call(Map pipelineParams) {
dir('scylla-cluster-tests') {
checkout scm
}
dockerLogin(params)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions vars/perfSearchBestConfigParallelPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def call(Map pipelineParams) {
wrap([$class: 'BuildUser']) {
dir('scylla-cluster-tests') {
checkout scm
dockerLogin(params)
(testDuration, testRunTimeout, runnerTimeout, collectLogsTimeout, resourceCleanupTimeout) = getJobTimeouts(params, builder.region)
}
}
Expand Down
1 change: 1 addition & 0 deletions vars/rollingOperatorUpgradePipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def call(Map pipelineParams) {
wrap([$class: 'BuildUser']) {
dir('scylla-cluster-tests') {
checkout scm
dockerLogin(params)
(testDuration, testRunTimeout, runnerTimeout, collectLogsTimeout, resourceCleanupTimeout) = getJobTimeouts(params, builder.region)
}
}
Expand Down
2 changes: 2 additions & 0 deletions vars/rollingUpgradePipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def call(Map pipelineParams) {
dir('scylla-cluster-tests') {
checkout scm
checkoutQaInternal(params)
dockerLogin(params)

ArrayList base_versions_list = params.base_versions.contains('.') ? params.base_versions.split('\\,') : []
supportedVersions = supportedUpgradeFromVersions(
Expand Down Expand Up @@ -207,6 +208,7 @@ def call(Map pipelineParams) {
checkoutQaInternal(params)
}
}
dockerLogin(params)
}
}
}
Expand Down

0 comments on commit 51f564e

Please sign in to comment.