Skip to content

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

Closed
wants to merge 4 commits into from

Conversation

LorbusChris
Copy link
Contributor

@LorbusChris LorbusChris commented Jun 12, 2023

Splits SCOS into a base and an OKD layer.

Tested locally.

/cc @sherine-k @travier

securityContext:
privileged: true
script: |
#!/usr/bin/env bash
Copy link
Member

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?

Copy link
Contributor Author

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.

@LorbusChris LorbusChris changed the title Add layered build for OKD-SCOS OKD-152: Add layered build for OKD-SCOS Jun 12, 2023
Copy link
Contributor

@sherine-k sherine-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!
/lgtm

@@ -12,9 +12,9 @@ spec:
script: |
#!/usr/bin/env bash
set -euxo pipefail

Copy link
Contributor Author

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

Copy link
Contributor Author

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
Copy link
Contributor Author

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


cat <<EOF >> src/config/Dockerfile
FROM quay.io/okd/centos-stream-coreos-9:4.14-x86_64
COPY rpms/ /srv/coreos/rpms/
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants