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') {
7070 include "deploy";
7171 arch_tagged_manifests(env.BASHBREW_ARCH)
7272 | deploy_objects[]
73- ' builds.json | tee deploy.json
73+ ' builds.json > deploy.json
7474 '''
7575 }
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+ }
7694
7795 withCredentials([
7896 string(credentialsId: 'dockerhub-public-proxy', variable: 'DOCKERHUB_PUBLIC_PROXY'),
@@ -88,7 +106,7 @@ node('put-shared') { ansiColor('xterm') {
88106 ./.go-env.sh go build -trimpath -o bin/deploy ./cmd/deploy
89107 fi
90108 )
91- .scripts/bin/deploy < deploy.json
109+ .scripts/bin/deploy < filtered- deploy.json
92110 '''
93111 }
94112 }
You can’t perform that action at this time.
0 commit comments