mirror of https://github.com/google/oss-fuzz.git
[infra] logging into docker
This commit is contained in:
parent
06d7cf1d41
commit
c23a04daf7
|
@ -18,9 +18,24 @@
|
|||
|
||||
def dockerOptions="--no-cache"
|
||||
|
||||
stage 'Build Docker Images'
|
||||
node {
|
||||
git url: 'https://github.com/google/oss-fuzz/'
|
||||
sh "docker build $dockerOptions --pull -t libfuzzer/base infra/base-images/base"
|
||||
sh "docker build $dockerOptions -t libfuzzer/base-clang infra/base-images/base-clang"
|
||||
sh "docker build $dockerOptions -t libfuzzer/base-fuzzer infra/base-images/base-fuzzer"
|
||||
}
|
||||
|
||||
stage 'Push Docker Images', concurrency: 1
|
||||
node {
|
||||
// login into docker
|
||||
def username = readFile('/var/secrets/dockerhub-login/username')
|
||||
def password = readFile('/var/secrets/dockerhub-login/password')
|
||||
def email = readFile('/var/secrets/dockerhub-login/email')
|
||||
|
||||
// #! is important here to disable default -x.
|
||||
sh "#!/bin/bash -e\ndocker info\ndocker version\ndocker login -u='${username}' -p='${password}' -e='${email}' https://index.docker.io/v1/"
|
||||
sh "docker push libfuzzer/base"
|
||||
sh "docker push libfuzzer/base-clang"
|
||||
sh "docker push libfuzzer/base-fuzzer"
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@ spec:
|
|||
mountPath: "/var/jenkins_home"
|
||||
- name: docker-sock
|
||||
mountPath: "/var/run/docker.sock"
|
||||
- name: dockerhub-login-secret
|
||||
mountPath: "/var/secrets/dockerhub-login"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: "/login"
|
||||
|
@ -54,3 +56,6 @@ spec:
|
|||
- name: docker-sock
|
||||
hostPath:
|
||||
path: /var/run/docker.sock
|
||||
- name: dockerhub-login-secret
|
||||
secret:
|
||||
secretName: dockerhub-login
|
||||
|
|
Loading…
Reference in New Issue