Skip to content

Commit

Permalink
rehearse: enable rehearsing jobs using config from roe/release
Browse files Browse the repository at this point in the history
Rehearsals work over in-repo configuration, but our config can be split
between two repos (openshift/release and r-o-e/release). A job in
openshift/release that uses a config for r-o-e/release will fail to be
rehearsed, because its ci-operator config will not be found. We can
solve this by checking out both repos and unifying them.

While it can be argued we should not have such cross-repo jobs, we will
definitely need to have jobs in r-o-e that use steps from a common
registry, and we'll need to rehearse such jobs when their steps change,
which can be solved with the same mechanism.
  • Loading branch information
petr-muller committed Mar 31, 2020
1 parent c636d3e commit 7ca2e88
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ presubmits:
cluster: api.ci
context: ci/prow/pj-rehearse
decorate: true
extra_refs:
- base_ref: master
org: redhat-operator-ecosystem
repo: release
name: pull-ci-openshift-release-master-pj-rehearse
optional: true
rerun_command: /test pj-rehearse
Expand All @@ -496,7 +500,7 @@ presubmits:
- --metrics-output=$(ARTIFACTS)/rehearse-metrics.json
- --rehearsal-limit=45
command:
- /bin/pj-rehearse
- ./hack/pj-rehearse.sh
image: pj-rehearse:latest
imagePullPolicy: Always
name: ""
Expand Down
16 changes: 16 additions & 0 deletions hack/pj-rehearse.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# This script runs the pj-rehearse tool after copying the content of the
# redhat-operator-ecosystem/release repository to the working directory,
# so that the content of that repository is considered in rehearsal decisions.

set -o errexit
set -o nounset
set -o pipefail

echo "Copying redhat-operator-ecosystem/release content"
cp -Rn ../../redhat-operator-ecosystem/release/ci-operator/config/* ./ci-operator/config/
cp -Rn ../../redhat-operator-ecosystem/release/ci-operator/jobs/* ./ci-operator/jobs/

echo "Running pj-rehearse"
pj-rehearse "$@"

0 comments on commit 7ca2e88

Please sign in to comment.