-
Notifications
You must be signed in to change notification settings - Fork 124
NO-JIRA: Switch layered build to treefile-apply
, drain get-ocp-repo.sh
#1780
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
Changes from all commits
2294939
5551bac
69a0b96
e2d149d
a2c632d
6596f19
d0fbf44
b4ce075
bee6596
c04f311
7997d1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,6 @@ supported: | |
- `rhel-9.6`: RHEL 9.6-based CoreOS; without OpenShift components. | ||
- `ocp-rhel-9.6`: RHEL 9.6-based CoreOS; including OpenShift components. | ||
- `c9s`: CentOS Stream-based CoreOS, without OKD components. | ||
- `okd-c9s`: CentOS Stream-based CoreOS, including OpenShift components. This | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still see the So maybe we should decommission the MOC pipeline [2] before merging this patch ? What do you think @Prashanth684 ? It's not a blocker though, the MOC builds would just fail and can be deal as a follow-up. [1] https://github.com/search?q=repo%3Aokd-project%2Fokd-coreos-pipeline%20okd-c9s&type=code There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The That said, there is indeed a small cleanup possible there which is that it no longer needs to provide a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Correct. MOC is only used for 4.18. Once we release 4.19 as stable, we will stop those also. We are working to migrate off MOC (we still do OKD release promotions from there) to an internal cluster. |
||
currently includes some packages from RHEL because not all packages required | ||
by OpenShift are provided in CentOS Stream. | ||
|
||
In the future, the `ocp-*` variants will be removed. Instead, OpenShift | ||
components will be layered by deriving from the `rhel-9.X`/`c9s` images. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# This script builds the OpenShift node image. It's called from `Containerfile`. set -xeuo pipefail | ||
|
||
# Avoid shipping modified .pyc files. Due to | ||
# https://github.com/ostreedev/ostree/issues/1469, any Python apps that | ||
# run (e.g. dnf) will cause pyc creation. We do this by backing them up and | ||
# restoring them at the end. | ||
find /usr -name '*.pyc' -exec mv {} {}.bak \; | ||
|
||
# fetch repos from in-cluster mirrors if we're running in OpenShift CI | ||
if [ "${OPENSHIFT_CI}" != 0 ]; then | ||
/run/src/ci/get-ocp-repo.sh /etc/yum.repos.d/ocp.repo | ||
fi | ||
|
||
source /etc/os-release | ||
|
||
# XXX: For SCOS, only allow certain packages to come from ART; everything else | ||
# should come from CentOS. We should eventually sever this. | ||
if [ $ID = centos ]; then | ||
# this says: "if the line starts with [.*], turn off printing. if the line starts with [our-repo], turn it on." | ||
awk "/\[.*\]/{p=0} /\[rhel-9.6-server-ose-4.19\]/{p=1} p" /etc/yum.repos.d/*.repo > /etc/yum.repos.d/okd.repo.tmp | ||
sed -i -e 's,rhel-9.6-server-ose-4.19,rhel-9.6-server-ose-4.19-okd,' /etc/yum.repos.d/okd.repo.tmp | ||
echo 'includepkgs=openshift-*,ose-aws-ecr-*,ose-azure-acr-*,ose-gcp-gcr-*' >> /etc/yum.repos.d/okd.repo.tmp | ||
mv /etc/yum.repos.d/okd.repo{.tmp,} | ||
fi | ||
|
||
# XXX: patch cri-o spec to use tmpfiles | ||
# https://github.com/CentOS/centos-bootc/issues/393 | ||
mkdir -p /var/opt | ||
|
||
# this is where all the real work happens | ||
rpm-ostree experimental compose treefile-apply \ | ||
--var id=$ID /run/src/packages-openshift.yaml | ||
|
||
# cleanup the repo file we injected | ||
if [ "${OPENSHIFT_CI}" != 0 ]; then | ||
rm /etc/yum.repos.d/ocp.repo | ||
fi | ||
|
||
find /usr -name '*.pyc.bak' -exec sh -c 'mv $1 ${1%.bak}' _ {} \; | ||
ostree container commit |
Uh oh!
There was an error while loading. Please reload this page.