From ea1018380d437b38e0dcc6e4f9d9ba2a6500b4dd Mon Sep 17 00:00:00 2001 From: Ashwin Das Date: Wed, 9 Aug 2023 17:32:36 -0400 Subject: [PATCH 1/4] switched to art-tools submodule --- .gitmodules | 9 +++------ art-tools | 1 + art-tools/doozer | 1 - art-tools/elliott | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) create mode 160000 art-tools delete mode 160000 art-tools/doozer delete mode 160000 art-tools/elliott diff --git a/.gitmodules b/.gitmodules index 53b4719d79..28b1e458ab 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "art-tools/doozer"] - path = art-tools/doozer - url = https://github.com/openshift-eng/doozer -[submodule "art-tools/elliott"] - path = art-tools/elliott - url = https://github.com/openshift-eng/elliott +[submodule "art-tools"] + path = art-tools + url = https://github.com/openshift-eng/art-tools.git diff --git a/art-tools b/art-tools new file mode 160000 index 0000000000..93da12777c --- /dev/null +++ b/art-tools @@ -0,0 +1 @@ +Subproject commit 93da12777ce5c1edf2450ed1046e3204cebbf52f diff --git a/art-tools/doozer b/art-tools/doozer deleted file mode 160000 index 1dd3c14f34..0000000000 --- a/art-tools/doozer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1dd3c14f34b6971f944b9f2067815acf4e27465d diff --git a/art-tools/elliott b/art-tools/elliott deleted file mode 160000 index 8bffdff869..0000000000 --- a/art-tools/elliott +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8bffdff8697a17cba63eba8fdfff0eb216c19518 From 6f18c335b4de1cfb097e5cea937be8f62bc7241b Mon Sep 17 00:00:00 2001 From: Ashwin Das Date: Wed, 9 Aug 2023 17:42:15 -0400 Subject: [PATCH 2/4] switch DOOZER_COMMIT and ELLIOTT_COMMIT to ART_TOOLS_COMMIT --- jobs/build/build-microshift/Jenkinsfile | 2 +- jobs/build/build-sync/Jenkinsfile | 2 +- jobs/build/gen-assembly/Jenkinsfile | 2 +- jobs/build/golang-builder/Jenkinsfile | 2 +- jobs/build/ocp4/Jenkinsfile | 2 +- jobs/build/ocp4_scan/Jenkinsfile | 2 +- jobs/build/prepare-release/Jenkinsfile | 2 +- jobs/build/promote-assembly/Jenkinsfile | 2 +- jobs/build/rebuild/Jenkinsfile | 2 +- jobs/build/sync-for-ci/Jenkinsfile | 2 +- jobs/scanning/covscan-images/Jenkinsfile | 2 +- pipeline-scripts/buildlib.groovy | 13 ++++--------- pipeline-scripts/commonlib.groovy | 15 +++------------ scheduled-jobs/build/sync-ci-images/Jenkinsfile | 2 +- 14 files changed, 19 insertions(+), 33 deletions(-) diff --git a/jobs/build/build-microshift/Jenkinsfile b/jobs/build/build-microshift/Jenkinsfile index 661f8491d9..147953962e 100644 --- a/jobs/build/build-microshift/Jenkinsfile +++ b/jobs/build/build-microshift/Jenkinsfile @@ -23,7 +23,7 @@ node('ocp-artifacts') { $class: "ParametersDefinitionProperty", parameterDefinitions: [ commonlib.ocpVersionParam('BUILD_VERSION', '4'), - commonlib.doozerParam(), + commonlib.artToolsParam(), string( name: "ASSEMBLY", description: "The name of an assembly to rebase & build for. e.g. 4.9.1", diff --git a/jobs/build/build-sync/Jenkinsfile b/jobs/build/build-sync/Jenkinsfile index 930c5c59bf..4d18bf79c5 100644 --- a/jobs/build/build-sync/Jenkinsfile +++ b/jobs/build/build-sync/Jenkinsfile @@ -36,7 +36,7 @@ node('covscan') { commonlib.suppressEmailParam(), commonlib.mockParam(), commonlib.ocpVersionParam('BUILD_VERSION', '4'), - commonlib.doozerParam(), + commonlib.artToolsParam(), string( name: 'ASSEMBLY', description: 'The name of an assembly to sync.', diff --git a/jobs/build/gen-assembly/Jenkinsfile b/jobs/build/gen-assembly/Jenkinsfile index 8be1a1dae8..0126910e1c 100644 --- a/jobs/build/gen-assembly/Jenkinsfile +++ b/jobs/build/gen-assembly/Jenkinsfile @@ -24,7 +24,7 @@ node { [ $class: "ParametersDefinitionProperty", parameterDefinitions: [ - commonlib.doozerParam(), + commonlib.artToolsParam(), commonlib.ocpVersionParam('BUILD_VERSION', '4'), string( name: "ASSEMBLY_NAME", diff --git a/jobs/build/golang-builder/Jenkinsfile b/jobs/build/golang-builder/Jenkinsfile index 9a2e53af6e..772740970d 100644 --- a/jobs/build/golang-builder/Jenkinsfile +++ b/jobs/build/golang-builder/Jenkinsfile @@ -13,7 +13,7 @@ node { parameterDefinitions: [ commonlib.dryrunParam(), commonlib.mockParam(), - commonlib.doozerParam(), + commonlib.artToolsParam(), string( name: 'DOOZER_DATA_PATH', description: 'ocp-build-data fork to use (e.g. test customizations on your own fork)', diff --git a/jobs/build/ocp4/Jenkinsfile b/jobs/build/ocp4/Jenkinsfile index d454b013a7..e492b873be 100644 --- a/jobs/build/ocp4/Jenkinsfile +++ b/jobs/build/ocp4/Jenkinsfile @@ -39,7 +39,7 @@ node { parameterDefinitions: [ commonlib.dryrunParam(), commonlib.mockParam(), - commonlib.doozerParam(), + commonlib.artToolsParam(), booleanParam( name: 'IGNORE_LOCKS', description: 'Do not wait for other builds in this version to complete (use only if you know they will not conflict)', diff --git a/jobs/build/ocp4_scan/Jenkinsfile b/jobs/build/ocp4_scan/Jenkinsfile index 6cf999c511..e97ce912b6 100644 --- a/jobs/build/ocp4_scan/Jenkinsfile +++ b/jobs/build/ocp4_scan/Jenkinsfile @@ -34,7 +34,7 @@ timeout(activity: true, time: 60, unit: 'MINUTES') { [ $class: 'ParametersDefinitionProperty', parameterDefinitions: [ - commonlib.doozerParam(), + commonlib.artToolsParam(), commonlib.ocpVersionParam('VERSION', '4'), commonlib.suppressEmailParam(), string( diff --git a/jobs/build/prepare-release/Jenkinsfile b/jobs/build/prepare-release/Jenkinsfile index 4edae882ca..50a853cbab 100644 --- a/jobs/build/prepare-release/Jenkinsfile +++ b/jobs/build/prepare-release/Jenkinsfile @@ -27,7 +27,7 @@ node { $class: "ParametersDefinitionProperty", parameterDefinitions: [ commonlib.ocpVersionParam('VERSION'), - commonlib.elliottParam(), + commonlib.artToolsParam(), string( name: "ASSEMBLY", description: "The name of an assembly; must be defined in releases.yml (e.g. 4.9.1)", diff --git a/jobs/build/promote-assembly/Jenkinsfile b/jobs/build/promote-assembly/Jenkinsfile index 01d1d75c45..30a173612d 100644 --- a/jobs/build/promote-assembly/Jenkinsfile +++ b/jobs/build/promote-assembly/Jenkinsfile @@ -31,7 +31,7 @@ node { $class: 'ParametersDefinitionProperty', parameterDefinitions: [ commonlib.ocpVersionParam('VERSION', '4'), // not used by "stream" assembly - commonlib.elliottParam(), + commonlib.artToolsParam(), string( name: 'ASSEMBLY', description: 'The name of an assembly to promote.', diff --git a/jobs/build/rebuild/Jenkinsfile b/jobs/build/rebuild/Jenkinsfile index 6548964894..1e101be45f 100644 --- a/jobs/build/rebuild/Jenkinsfile +++ b/jobs/build/rebuild/Jenkinsfile @@ -22,7 +22,7 @@ node { $class: "ParametersDefinitionProperty", parameterDefinitions: [ commonlib.ocpVersionParam('BUILD_VERSION', '4'), - commonlib.doozerParam(), + commonlib.artToolsParam(), string( name: "ASSEMBLY", description: "The name of an assembly to rebase & build for. e.g. 4.9.1", diff --git a/jobs/build/sync-for-ci/Jenkinsfile b/jobs/build/sync-for-ci/Jenkinsfile index 9b4019337f..ac02d8abea 100644 --- a/jobs/build/sync-for-ci/Jenkinsfile +++ b/jobs/build/sync-for-ci/Jenkinsfile @@ -36,7 +36,7 @@ node { [ $class: 'ParametersDefinitionProperty', parameterDefinitions: [ - commonlib.doozerParam(), + commonlib.artToolsParam(), string( name: 'GROUP', description: 'The ocp-build-data group to synchronize (e.g. openshift-4.3)', diff --git a/jobs/scanning/covscan-images/Jenkinsfile b/jobs/scanning/covscan-images/Jenkinsfile index cf39efaa1a..0f96d6eb36 100644 --- a/jobs/scanning/covscan-images/Jenkinsfile +++ b/jobs/scanning/covscan-images/Jenkinsfile @@ -68,7 +68,7 @@ timeout(activity: true, time: 1, unit: 'DAYS') { // if there is no log activity defaultValue: false, description: "Force rebuild of the covscan repositories." ), - commonlib.doozerParam(), + commonlib.artToolsParam(), commonlib.mockParam(), ] ], diff --git a/pipeline-scripts/buildlib.groovy b/pipeline-scripts/buildlib.groovy index 3100b236e6..d6cad6ec23 100644 --- a/pipeline-scripts/buildlib.groovy +++ b/pipeline-scripts/buildlib.groovy @@ -153,15 +153,10 @@ def setup_venv(use_python38=false) { commonlib.shell(script: "pip install --upgrade pip") - // Override Doozer submodule - if (params.DOOZER_COMMIT) { - where = DOOZER_COMMIT.split('@') - commonlib.shell(script: "rm -rf art-tools/doozer ; cd art-tools; git clone https://github.com/${where[0]}/doozer.git; cd doozer; git checkout ${where[1]}") - } - // Override Elliott submodule - if (params.ELLIOTT_COMMIT) { - where = ELLIOTT_COMMIT.split('@') - commonlib.shell(script: "rm -rf art-tools/elliott ; cd art-tools; git clone https://github.com/${where[0]}/elliott.git; cd elliott; git checkout ${where[1]}") + // Override art-tools submodule + if (params.ART_TOOLS_COMMIT) { + where = ART_TOOLS_COMMIT.split('@') + commonlib.shell(script: "rm -rf art-tools; git clone https://github.com/${where[0]}/art-tools.git; cd art-tools; git checkout ${where[1]}") } commonlib.shell(script: "pip install -e art-tools/elliott/ -e art-tools/doozer/ -e pyartcd/") diff --git a/pipeline-scripts/commonlib.groovy b/pipeline-scripts/commonlib.groovy index f4613c8eb1..e1d4e7a768 100644 --- a/pipeline-scripts/commonlib.groovy +++ b/pipeline-scripts/commonlib.groovy @@ -92,19 +92,10 @@ def mockParam() { ] } -def doozerParam() { +def artToolsParam() { return [ - name: 'DOOZER_COMMIT', - description: 'Override the doozer submodule; Format is ghuser@commitish e.g. jupierce@covscan-to-podman-2', - $class: 'hudson.model.StringParameterDefinition', - defaultValue: '' - ] -} - -def elliottParam() { - return [ - name: 'ELLIOTT_COMMIT', - description: 'Override the elliott submodule; Format is ghuser@commitish e.g. jupierce@covscan-to-podman-2', + name: 'ART_TOOLS_COMMIT', + description: 'Override the art-tools submodule; Format is ghuser@commitish e.g. jupierce@covscan-to-podman-2', $class: 'hudson.model.StringParameterDefinition', defaultValue: '' ] diff --git a/scheduled-jobs/build/sync-ci-images/Jenkinsfile b/scheduled-jobs/build/sync-ci-images/Jenkinsfile index ddec9e730f..8005908649 100644 --- a/scheduled-jobs/build/sync-ci-images/Jenkinsfile +++ b/scheduled-jobs/build/sync-ci-images/Jenkinsfile @@ -58,7 +58,7 @@ node { $class: 'BooleanParameterDefinition', defaultValue: true ], - commonlib.doozerParam(), + commonlib.artToolsParam(), commonlib.dryrunParam(), commonlib.mockParam(), ], From c24eb2ef1ab21fa0f02778f54c353e514c5086d6 Mon Sep 17 00:00:00 2001 From: Ashwin Das Date: Thu, 10 Aug 2023 10:04:37 -0400 Subject: [PATCH 3/4] update bump-art-tool --- bump-art-tool | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/bump-art-tool b/bump-art-tool index 40464e81bb..a61ebdfab9 100755 --- a/bump-art-tool +++ b/bump-art-tool @@ -1,19 +1,13 @@ #!/usr/bin/env bash set -e -test -z "$1" && { - echo "Usage: ./bump-art-tool [doozer|elliott]"; - exit 1; +test -n "$1" && { + echo "Usage: ./bump-art-tool"; + exit 1; } -test -d "art-tools/$1" || { - echo "'$1' is not a valid art-tool submodule. Available submodules:"; - git submodule; - exit 1; -} - -git submodule update --remote --checkout -- art-tools/$1 -cd art-tools/$1 -git checkout master +git submodule update --remote --checkout -- art-tools +cd art-tools +git checkout main git pull -cd ../.. +cd .. \ No newline at end of file From f156c8a99f9abc73eb957ae2717946ec5b4a3972 Mon Sep 17 00:00:00 2001 From: Ashwin Das Date: Thu, 10 Aug 2023 11:12:51 -0400 Subject: [PATCH 4/4] bump art-tools --- art-tools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/art-tools b/art-tools index 93da12777c..c99b3dec1b 160000 --- a/art-tools +++ b/art-tools @@ -1 +1 @@ -Subproject commit 93da12777ce5c1edf2450ed1046e3204cebbf52f +Subproject commit c99b3dec1b93f0c413ee273724dfb1ffbb207e14