mirror of
https://github.com/containers/podman.git
synced 2025-05-20 08:36:23 +08:00
Merge pull request #18545 from cevich/podman_next
Cirrus: Add support for podman-next magic
This commit is contained in:
@ -300,7 +300,6 @@ bindings_task:
|
|||||||
only_if: >-
|
only_if: >-
|
||||||
$CIRRUS_PR != '' &&
|
$CIRRUS_PR != '' &&
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:COPR.*' &&
|
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*'
|
$CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*'
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- build
|
||||||
@ -459,7 +458,6 @@ docker-py_test_task:
|
|||||||
only_if: ¬_tag_branch_build_docs >-
|
only_if: ¬_tag_branch_build_docs >-
|
||||||
$CIRRUS_PR != '' &&
|
$CIRRUS_PR != '' &&
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:COPR.*' &&
|
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*'
|
$CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*'
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -566,7 +564,6 @@ windows_smoke_test_task:
|
|||||||
$CIRRUS_TAG == '' &&
|
$CIRRUS_TAG == '' &&
|
||||||
$CIRRUS_CRON != 'multiarch' &&
|
$CIRRUS_CRON != 'multiarch' &&
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:COPR.*' &&
|
|
||||||
$CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
|
$CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
|
||||||
$CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
|
$CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -684,7 +681,6 @@ podman_machine_task:
|
|||||||
only_if: ¬_tag_build_docs_multiarch >-
|
only_if: ¬_tag_build_docs_multiarch >-
|
||||||
$CIRRUS_TAG == '' &&
|
$CIRRUS_TAG == '' &&
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:COPR.*' &&
|
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' &&
|
$CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' &&
|
||||||
$CIRRUS_CRON != 'multiarch'
|
$CIRRUS_CRON != 'multiarch'
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -1090,7 +1086,6 @@ artifacts_task:
|
|||||||
# Docs: ./contrib/cirrus/CIModes.md
|
# Docs: ./contrib/cirrus/CIModes.md
|
||||||
only_if: >-
|
only_if: >-
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
$CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' &&
|
||||||
$CIRRUS_CHANGE_TITLE !=~ '.*CI:COPR.*' &&
|
|
||||||
$CIRRUS_CRON != 'multiarch' &&
|
$CIRRUS_CRON != 'multiarch' &&
|
||||||
$CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
|
$CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
|
||||||
$CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
|
$CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
|
||||||
|
@ -79,13 +79,6 @@ of this document, it's not possible to override the behavior of `$CIRRUS_PR`.
|
|||||||
+ meta
|
+ meta
|
||||||
+ success
|
+ success
|
||||||
|
|
||||||
### Intended `[CI:COPR]` PR Tasks:
|
|
||||||
+ *build*
|
|
||||||
+ validate
|
|
||||||
+ swagger
|
|
||||||
+ meta
|
|
||||||
+ success
|
|
||||||
|
|
||||||
### Intended `[CI:BUILD]` PR Tasks:
|
### Intended `[CI:BUILD]` PR Tasks:
|
||||||
+ *build*
|
+ *build*
|
||||||
+ validate
|
+ validate
|
||||||
@ -96,13 +89,13 @@ of this document, it's not possible to override the behavior of `$CIRRUS_PR`.
|
|||||||
+ success
|
+ success
|
||||||
+ artifacts
|
+ artifacts
|
||||||
|
|
||||||
### Intended `[CI:NVAV=update]` or `[CI:NVAV=main]` behavior:
|
### Intended `[CI:NEXT]` behavior:
|
||||||
|
|
||||||
If and only if the PR is in **draft-mode**, either update Fedora CI VMs to the
|
If and only if the PR is in **draft-mode**, update Fedora CI VMs at runtime
|
||||||
latest Netavark/Aardvark-dns RPMs ("update" keyword), or install the most
|
to the latest packages available in the podman-next COPR repo. These packages
|
||||||
recent package builds from their `main` branch ("main" keyword). These are
|
represent primary podman dependencies, and are regularly built from their
|
||||||
**runtime changes** only, and will not persist or impact other PRs
|
upstream repos. These are **runtime changes** only, and will not persist
|
||||||
in any way.
|
or impact other PRs in any way.
|
||||||
|
|
||||||
The intent is to temporarily support testing of updates with the latest podman
|
The intent is to temporarily support testing of updates with the latest podman
|
||||||
code & tests. To help prevent accidents, when the PR is not in draft-mode, the
|
code & tests. To help prevent accidents, when the PR is not in draft-mode, the
|
||||||
|
@ -256,39 +256,6 @@ use_netavark() {
|
|||||||
# N/B: The CNI packages are still installed and available. This is
|
# N/B: The CNI packages are still installed and available. This is
|
||||||
# on purpose, since CI needs to verify the selection mechanisms are
|
# on purpose, since CI needs to verify the selection mechanisms are
|
||||||
# functional when both are available.
|
# functional when both are available.
|
||||||
|
|
||||||
# See ./contrib/cirrus/CIModes.md.
|
|
||||||
# Vars defined by cirrus-ci
|
|
||||||
# shellcheck disable=SC2154
|
|
||||||
if [[ ! "$OS_RELEASE_ID" =~ "debian" ]] && \
|
|
||||||
[[ "$CIRRUS_CHANGE_TITLE" =~ CI:[AN]V[AN]V= ]]
|
|
||||||
then
|
|
||||||
# shellcheck disable=SC2154
|
|
||||||
if [[ "$CIRRUS_PR_DRAFT" != "true" ]]; then
|
|
||||||
die "Magic 'CI:NVAV=*' string can only be used on DRAFT PRs"
|
|
||||||
fi
|
|
||||||
|
|
||||||
magickind=$(sed -r -e 's~(.*CI:[AN]V[AN]V=)(\w+)(.*)~\2~' <<<"$CIRRUS_CHANGE_TITLE")
|
|
||||||
|
|
||||||
# The update source scheme is defined during VM image build.
|
|
||||||
# See c/automation_images repo. cache_images/fedora_packaging.sh
|
|
||||||
repokind="updates-testing" # $DISTRO_NV==$FEDORA_NAME
|
|
||||||
# shellcheck disable=SC2154
|
|
||||||
if [[ "$DISTRO_NV" =~ $PRIOR_FEDORA_NAME ]]; then
|
|
||||||
repokind="updates"
|
|
||||||
# else we're not running fedora, or .cirrus.yml env. vars are setup wrong.
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$magickind" == "update" ]]; then
|
|
||||||
warn "Updating netavark/aardvark RPM packages from ***the fedora $repokind repo.***"
|
|
||||||
elif [[ "$magickind" == "main" ]]; then
|
|
||||||
warn "Installing latest netavark/aardvark packages from their main branches using ***the podman-next COPR repo***"
|
|
||||||
showrun dnf copr enable rhcontainerbot/podman-next -y
|
|
||||||
else
|
|
||||||
die "Unknown CI:NVAV= '$magickind' keyword. Only 'update' and 'main' are supported."
|
|
||||||
fi
|
|
||||||
showrun dnf upgrade -y netavark aardvark-dns
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove all files provided by the distro version of podman.
|
# Remove all files provided by the distro version of podman.
|
||||||
|
@ -395,6 +395,28 @@ case "$TEST_FLAVOR" in
|
|||||||
*) die_unknown TEST_FLAVOR
|
*) die_unknown TEST_FLAVOR
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# See ./contrib/cirrus/CIModes.md.
|
||||||
|
# Vars defined by cirrus-ci
|
||||||
|
# shellcheck disable=SC2154
|
||||||
|
if [[ ! "$OS_RELEASE_ID" =~ "debian" ]] && \
|
||||||
|
[[ "$CIRRUS_CHANGE_TITLE" =~ CI:NEXT ]]
|
||||||
|
then
|
||||||
|
# shellcheck disable=SC2154
|
||||||
|
if [[ "$CIRRUS_PR_DRAFT" != "true" ]]; then
|
||||||
|
die "Magic 'CI:NEXT' string can only be used on DRAFT PRs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
showrun dnf copr enable rhcontainerbot/podman-next -y
|
||||||
|
|
||||||
|
# DNF ignores repos that don't exist. For example, updates-testing is not
|
||||||
|
# enabled on Fedora N-1 CI VMs. Don't updated everything, isolate just the
|
||||||
|
# podman-next COPR updates.
|
||||||
|
showrun dnf update -y \
|
||||||
|
"--enablerepo=copr:copr.fedorainfracloud.org:rhcontainerbot:podman-next" \
|
||||||
|
"--disablerepo=copr:copr.fedorainfracloud.org:sbrivio:passt" \
|
||||||
|
"--disablerepo=fedora*" "--disablerepo=updates*"
|
||||||
|
fi
|
||||||
|
|
||||||
# Must be the very last command. Prevents setup from running twice.
|
# Must be the very last command. Prevents setup from running twice.
|
||||||
echo 'SETUP_ENVIRONMENT=1' >> /etc/ci_environment
|
echo 'SETUP_ENVIRONMENT=1' >> /etc/ci_environment
|
||||||
echo -e "\n# End of global variable definitions" \
|
echo -e "\n# End of global variable definitions" \
|
||||||
|
Reference in New Issue
Block a user