File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,27 @@ node('put-shared') { ansiColor('xterm') {
70
70
include "deploy";
71
71
arch_tagged_manifests(env.BASHBREW_ARCH)
72
72
| deploy_objects[]
73
- ' builds.json | tee deploy.json
73
+ ' builds.json > deploy.json
74
74
'''
75
75
}
76
+ stage('Filter') {
77
+ // using the previous successful deploy.json, filter the current deploy.json with items already pushed last time
78
+ sh'''
79
+ wget --timeout=5 -qO past-deploy.json "$JOB_URL/lastSuccessfulBuild/artifact/deploy.json"
80
+ # swap to this touch instead of the wget above to (re)bootstrap
81
+ #touch past-deploy.json
82
+ jq --slurpfile past ./past-deploy.json 'select( IN($past[]) | not )' ./deploy.json > filtered-deploy.json
83
+ '''
84
+ }
85
+ stage('Archive') {
86
+ archiveArtifacts(
87
+ artifacts: [
88
+ 'deploy.json',
89
+ 'filtered-deploy.json',
90
+ ].join(','),
91
+ fingerprint: true,
92
+ )
93
+ }
76
94
77
95
withCredentials([
78
96
string(credentialsId: 'dockerhub-public-proxy', variable: 'DOCKERHUB_PUBLIC_PROXY'),
@@ -89,7 +107,7 @@ node('put-shared') { ansiColor('xterm') {
89
107
./.go-env.sh go build -trimpath -o bin/deploy ./cmd/deploy
90
108
fi
91
109
)
92
- .scripts/bin/deploy < deploy.json
110
+ .scripts/bin/deploy < filtered- deploy.json
93
111
'''
94
112
}
95
113
}
You can’t perform that action at this time.
0 commit comments