forked from docker-library/oi-janky-groovy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashbrew-pipeline.groovy
57 lines (54 loc) · 1.04 KB
/
bashbrew-pipeline.groovy
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
properties([
buildDiscarder(logRotator(daysToKeepStr: '14')),
disableConcurrentBuilds(),
pipelineTriggers([
cron('H H * * *'),
]),
])
node {
stage('Checkout') {
checkout(
poll: true,
scm: [
$class: 'GitSCM',
userRemoteConfigs: [[
url: 'https://github.com/docker-library/official-images.git',
]],
branches: [[name: '*/master']],
extensions: [
[
$class: 'RelativeTargetDirectory',
relativeTargetDir: 'oi',
],
[
$class: 'CleanCheckout',
],
[
$class: 'PathRestriction',
excludedRegions: '',
includedRegions: 'bashbrew/go',
],
],
doGenerateSubmoduleConfigurations: false,
submoduleCfg: [],
],
)
}
ansiColor('xterm') {
stage('Build') {
sh '''
docker build -t bashbrew --pull -f oi/bashbrew/Dockerfile.release oi/bashbrew
rm -rf bin
docker run -i --rm bashbrew tar -c bin \\
| tar -xv
'''
}
}
stage('Archive') {
archiveArtifacts(
artifacts: 'bin/*',
fingerprint: true,
onlyIfSuccessful: true,
)
}
}