Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ART-3147] Switch to art-tools #3881

Merged
merged 4 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions art-tools
Submodule art-tools added at c99b3d
1 change: 0 additions & 1 deletion art-tools/doozer
Submodule doozer deleted from 1dd3c1
1 change: 0 additions & 1 deletion art-tools/elliott
Submodule elliott deleted from 8bffdf
20 changes: 7 additions & 13 deletions bump-art-tool
Original file line number Diff line number Diff line change
@@ -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 ..
2 changes: 1 addition & 1 deletion jobs/build/build-microshift/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion jobs/build/build-sync/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion jobs/build/gen-assembly/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ node {
[
$class: "ParametersDefinitionProperty",
parameterDefinitions: [
commonlib.doozerParam(),
commonlib.artToolsParam(),
commonlib.ocpVersionParam('BUILD_VERSION', '4'),
string(
name: "ASSEMBLY_NAME",
Expand Down
2 changes: 1 addition & 1 deletion jobs/build/golang-builder/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down
2 changes: 1 addition & 1 deletion jobs/build/ocp4/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down
2 changes: 1 addition & 1 deletion jobs/build/ocp4_scan/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion jobs/build/prepare-release/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
2 changes: 1 addition & 1 deletion jobs/build/promote-assembly/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion jobs/build/rebuild/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion jobs/build/sync-for-ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down
2 changes: 1 addition & 1 deletion jobs/scanning/covscan-images/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
]
],
Expand Down
13 changes: 4 additions & 9 deletions pipeline-scripts/buildlib.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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/")
Expand Down
15 changes: 3 additions & 12 deletions pipeline-scripts/commonlib.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
]
Expand Down
2 changes: 1 addition & 1 deletion scheduled-jobs/build/sync-ci-images/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ node {
$class: 'BooleanParameterDefinition',
defaultValue: true
],
commonlib.doozerParam(),
commonlib.artToolsParam(),
commonlib.dryrunParam(),
commonlib.mockParam(),
],
Expand Down