-
Notifications
You must be signed in to change notification settings - Fork 11
OKD-152: Add layered build for OKD-SCOS #46
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
Conversation
securityContext: | ||
privileged: true | ||
script: | | ||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this Task be separated in future and run in a separate pipeline (like the 'future' payload one, as we can do for okd/fcos) and maintain the coreos pipeline to only build the base os?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's definitely the plan to buid base and layer(s) separately!
I'd like to be able to have one pipeline that can be flexibly configured either way, but nothing will stop you from creating a completely separate pipeline with that task, or even run it as a task run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
/lgtm
399e15d
to
23c92a5
Compare
23c92a5
to
ef77b94
Compare
5888931
to
5a09efb
Compare
@@ -12,9 +12,9 @@ spec: | |||
script: | | |||
#!/usr/bin/env bash | |||
set -euxo pipefail | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: whitespaces
dnf install -y jq | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: whitespaces
@@ -27,7 +27,7 @@ spec: | |||
sed -i 's/RPM-GPG-KEY-CentOS-Official/RPM-GPG-KEY-centosofficial/g' src/config/c9s.repo | |||
|
|||
cat <<EOF >> src/config/Dockerfile | |||
FROM scos | |||
FROM quay.io/okd/centos-stream-coreos-9:4.14-x86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be nice as a parameter
5a09efb
to
a8c250c
Compare
|
||
cat <<EOF >> src/config/Dockerfile | ||
FROM quay.io/okd/centos-stream-coreos-9:4.14-x86_64 | ||
COPY rpms/ /srv/coreos/rpms/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be COPY rpms/ /workspace/coreos/rpms/
since this commit 067ce9d
Otherwise we are hitting the issue below :
error: Updating rpm-md repo 'artifacts': /workspace/coreos/rpms/ was not found
during the step STEP 5/6: RUN cat /etc/os-release && rpm-ostree --version && ostree --version && rpm-ostree ex rebuild && rpm-ostree cleanup -m && rm -rf /var/lib/unbound /srv/coreos/rpms /etc/rpm-ostree/origin.d /etc/yum.repos.d/c9s.repo && ostree container commit
results: | ||
- name: output | ||
workspaces: | ||
- mountPath: /srv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with 067ce9d we should use /workspace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, replace all the references of /srv
by /workspace
in the script
|
||
workspaces: | ||
- name: regcred | ||
- mountPath: /srv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workspaces: | ||
- name: ws | ||
workspace: shared-workspace | ||
- name: build-layer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should run the build-layer
task after cosa-test
and cosa-upload-baseos
in order to pull the freshly baseos
built during cosa-build-baseos
task of the current pipeline. Otherwise, we would pull the baseos
image from the latest pipeline run
Splits SCOS into a base and an OKD layer.
Tested locally.
/cc @sherine-k @travier