Skip to content

Commit 6ad2e19

Browse files
authored
Merge pull request #97 from infosiftr/no-subset
Remove `subset.txt`
2 parents 7e8e42b + 95dacd6 commit 6ad2e19

File tree

2 files changed

+5
-28
lines changed

2 files changed

+5
-28
lines changed

Jenkinsfile.meta

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,6 @@ node {
4545
sh '''
4646
git submodule update --remote --merge .doi
4747
git submodule update --remote --merge .scripts
48-
49-
# TODO once "repos_anti_subset" in "doi.jq" is empty, we can remove this (and all associated usages of "subset.txt" can just be "--all" or go away completely)
50-
# in all the places we need to interact with our "subset" it's a lot easier to have an explicit list of what's included, so we'll continue to generate "subset.txt" until it contains the full set
51-
bashbrew list --all --repos | jq -L.scripts -rsR '
52-
include "doi";
53-
rtrimstr("\n")
54-
| split("\n")
55-
| . - repos_anti_subset
56-
| join("\n")
57-
' > subset.txt
58-
git add subset.txt
5948
'''
6049
}
6150
@@ -65,11 +54,11 @@ node {
6554
string(credentialsId: 'dockerhub-public-proxy-host', variable: 'DOCKERHUB_PUBLIC_PROXY_HOST'),
6655
]) {
6756
stage('Fetch') {
68-
sh 'bashbrew --library .doi/library fetch $(cat subset.txt)' // TODO --all
57+
sh 'bashbrew --library .doi/library fetch --all'
6958
}
7059
stage('Sources') {
7160
sh '''
72-
# we only need to regenerate "sources.json" if ".doi", ".scripts", or "subset.txt" have changed since we last generated it
61+
# we only need to regenerate "sources.json" if ".doi" or ".scripts" have changed since we last generated it
7362

7463
needsBuild=
7564
if [ ! -s commits.json ] || [ ! -s sources.json ]; then
@@ -78,17 +67,14 @@ node {
7867

7968
doi="$(git -C .doi log -1 --format='format:%H')"
8069
scripts="$(git -C .scripts log -1 --format='format:%H')"
81-
subset="$(sha256sum subset.txt | cut -d' ' -f1)"
82-
export doi scripts subset
83-
jq -n '{ doi: env.doi, scripts: env.scripts, subset: env.subset }' | tee commits.json
70+
export doi scripts
71+
jq -n '{ doi: env.doi, scripts: env.scripts }' | tee commits.json
8472
if [ -z "$needsBuild" ] && ! git diff --exit-code commits.json; then
8573
needsBuild=1
8674
fi
8775

8876
if [ -n "$needsBuild" ]; then
89-
images="$(cat subset.txt)"
90-
[ -n "$images" ]
91-
.scripts/sources.sh $images > sources.json
77+
.scripts/sources.sh --all > sources.json
9278
fi
9379
'''
9480
}

doi.jq

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
# our old "subset.txt", but inverted
2-
# this way, we can "fail open" correctly (new images should be part of meta by default)
3-
# see "Jenkinsfile.meta" for how/why this turns into "subset.txt"
4-
def repos_anti_subset:
5-
[
6-
empty
7-
]
8-
;
9-
101
# a helper for "build_should_sbom"
112
def _sbom_subset:
123
[

0 commit comments

Comments
 (0)