forked from aquasecurity/kube-bench
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
38 lines (36 loc) · 1.32 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
pipeline {
agent {
label 'amazon-linux2'
}
stages {
stage('Login to registries') {
steps {
script {
withCredentials([
file(credentialsId: 'google-artifactory-dev-write', variable: 'GAR_WR_SECRET')
]) {
sh '''#!/bin/bash
set -euo pipefail
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
'''
}
}
}
}
stage('Build and Push Dependency Image') {
steps {
checkout([$class: 'GitSCM',
branches: [[name: "${params.TAG}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'github-jenkins-user-token', url: 'https://github.com/draios/kube-bench.git']]
])
script {
sh "IMAGE_TAG=${params.TAG} PUSH=yes make -f makefile-sysdig build-dependency-image-gar"
}
}
}
}
}