Skip to content

Commit f755519

Browse files
Merge pull request docker#148 from guillaumerose/jenkinsfile
Add Jenkinsfile
2 parents beda055 + 11d9f9d commit f755519

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

Jenkinsfile

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
pipeline {
2+
agent none
3+
options {
4+
checkoutToSubdirectory('src/github.com/docker/docker-credential-helpers')
5+
}
6+
stages {
7+
stage('build') {
8+
parallel {
9+
stage('linux') {
10+
agent {
11+
kubernetes {
12+
label 'declarative'
13+
containerTemplate {
14+
name 'golang'
15+
image 'golang:1.12.4'
16+
ttyEnabled true
17+
command 'cat'
18+
}
19+
}
20+
}
21+
environment {
22+
GOPATH = pwd()
23+
PATH = "/usr/local/go/bin:${GOPATH}/bin:$PATH"
24+
}
25+
steps {
26+
container('golang') {
27+
dir('src/github.com/docker/docker-credential-helpers') {
28+
sh 'apt-get update && apt-get install -y libsecret-1-dev pass'
29+
sh 'make deps fmt lint test'
30+
sh 'make pass secretservice'
31+
archiveArtifacts 'bin/docker-credential-*'
32+
}
33+
}
34+
}
35+
}
36+
stage('mac') {
37+
agent {
38+
label 'mac-build && go1.12.4'
39+
}
40+
environment {
41+
PATH = "/usr/local/go/bin:${GOPATH}/bin:$PATH"
42+
GOPATH = pwd()
43+
}
44+
steps {
45+
dir('src/github.com/docker/docker-credential-helpers') {
46+
sh 'make deps fmt lint test'
47+
sh 'make osxcodesign'
48+
archiveArtifacts 'bin/docker-credential-*'
49+
}
50+
}
51+
}
52+
stage('windows') {
53+
agent {
54+
label 'win-build && go1.12.4'
55+
}
56+
environment {
57+
GOPATH = pwd()
58+
PATH = "${pwd()}/bin;$PATH"
59+
PFX = credentials('windows-build-pfx-sanitize')
60+
PFXPASSWORD = credentials('windows-build-pfx-password')
61+
}
62+
steps {
63+
dir('src/github.com/docker/docker-credential-helpers') {
64+
sh 'echo ${PFX} | base64 -d > pfx'
65+
66+
sh 'make deps fmt lint test'
67+
sh 'make wincred'
68+
bat """ "C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x86\\signtool.exe" sign /fd SHA256 /a /f pfx /p ${PFXPASSWORD} /d Docker /du https://www.docker.com /t http://timestamp.verisign.com/scripts/timestamp.dll bin\\docker-credential-wincred.exe """
69+
archiveArtifacts 'bin/docker-credential-*'
70+
}
71+
}
72+
post {
73+
always {
74+
sh 'rm -f pfx'
75+
}
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}

0 commit comments

Comments
 (0)