Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
giovinazzorocco authored Jan 8, 2025
1 parent 0f0dc15 commit 53aa602
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ pipeline {
steps {
script {
withCredentials([
usernamePassword(credentialsId: 'jenkins-artifactory', usernameVariable: 'ARTIFACTORY_USER', passwordVariable: 'ARTIFACTORY_PASS'),
file(credentialsId: 'google-artifactory-dev-write', variable: 'GAR_WR_SECRET')
]) {
sh '''#!/bin/bash
set -euo pipefail
echo "Logging into Artifactory"
docker login docker.internal.sysdig.com -u="$ARTIFACTORY_USER" -p="$ARTIFACTORY_PASS"
echo "Logging into GAR dev"
cat $GAR_WR_SECRET | docker login --username _json_key --password-stdin us-docker.pkg.dev/sysdig-artifact-registry-dev/gar-docker
'''
Expand All @@ -32,13 +29,10 @@ pipeline {
userRemoteConfigs: [[credentialsId: 'github-jenkins-user-token', url: 'https://github.com/draios/linux-bench.git']]
])
script {
docker.withRegistry("https://docker.internal.sysdig.com", 'jenkins-artifactory') {
sh "IMAGE_TAG=${params.TAG} PUSH=yes make -f makefile-sysdig build-dependency-image"
sh "IMAGE_TAG=${params.TAG} PUSH=yes make -f makefile-sysdig build-dependency-image-gar"
}
}
sh "IMAGE_TAG=${params.TAG} PUSH=yes make -f makefile-sysdig build-dependency-image-gar"
}
}
}
}
}

0 comments on commit 53aa602

Please sign in to comment.