mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
cirrus: move renovate check into validate
The renovate config is used for the renovate bot, validating this in the prior fedora prebuild setp is just confusing and hidden. The problem is this image is very big so it is slow to download/extract. To speed things up given it is only a single file we check the diff if we even changed it. Now one could argue this should be part of the validate Makefile target but I given the size I do not want this run by default and I am not sure if we should do the diff check in the Makefile. Lastly remove -it, these is meant for interactive use and throws a warning here because we have no actual tty attached. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -65,12 +65,6 @@ if [[ "${DISTRO_NV}" == "$PRIOR_FEDORA_NAME" ]]; then
|
||||
# Tests for pr-should-link-jira
|
||||
showrun ${SCRIPT_BASE}/pr-should-link-jira.t
|
||||
|
||||
msg "Checking renovate config."
|
||||
showrun podman run -it \
|
||||
-v ./.github/renovate.json5:/usr/src/app/renovate.json5:z \
|
||||
ghcr.io/renovatebot/renovate:latest \
|
||||
renovate-config-validator
|
||||
|
||||
# Run this during daily cron job to prevent a GraphQL API change/breakage
|
||||
# from impacting every PR. Down-side being if it does fail, a maintainer
|
||||
# will need to do some archaeology to find it.
|
||||
|
@ -22,6 +22,10 @@ source $(dirname $0)/lib.sh
|
||||
showrun echo "starting"
|
||||
|
||||
function _run_validate-source() {
|
||||
# This target is only meant to be run on PRs.
|
||||
# We need the following env vars set for the git diff check below.
|
||||
req_env_vars CIRRUS_CHANGE_IN_REPO PR_BASE_SHA
|
||||
|
||||
showrun make validate-source
|
||||
|
||||
# make sure PRs have tests
|
||||
@ -29,6 +33,22 @@ function _run_validate-source() {
|
||||
|
||||
# make sure PRs have jira links (if needed for branch)
|
||||
showrun make test-jira-links-included
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
head=$CIRRUS_CHANGE_IN_REPO
|
||||
# shellcheck disable=SC2154
|
||||
base=$PR_BASE_SHA
|
||||
echo "_run_validate-source: head=$head base=$base"
|
||||
diffs=$(git diff --name-only $base $head)
|
||||
|
||||
# If PR touches renovate config validate it, as the image is very big only do so when needed
|
||||
if grep -E -q "^.github/renovate.json5" <<<"$diffs"; then
|
||||
msg "Checking renovate config."
|
||||
showrun podman run \
|
||||
-v ./.github/renovate.json5:/usr/src/app/renovate.json5:z \
|
||||
ghcr.io/renovatebot/renovate:latest \
|
||||
renovate-config-validator
|
||||
fi
|
||||
}
|
||||
|
||||
function _run_unit() {
|
||||
|
Reference in New Issue
Block a user