Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport perf-v15] fix(pipelines): call docker login on all pipelines #9478

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -170,6 +171,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 @@ -214,6 +217,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 @@ -194,6 +194,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 @@ -175,6 +176,7 @@ def call(Map pipelineParams) {
checkoutQaInternal(params)
}
}
dockerLogin(params)
}
}
}
Expand Down