Skip to content

Add Jenkinsfile compose pipeline - #5

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
jlebon:pr/pipeline
May 9, 2018
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
jlebon:pr/pipeline

Conversation

@jlebon

@jlebon jlebon commented May 8, 2018

Copy link
Copy Markdown
Member

Add a Jenkinsfile that runs the treecompose and publishes it. Right now,
this is only running the rhcos variant, so it's publishing to some
place private. The next steps are to also build cloud images, and to
also build the origin CentOS-based variant and push that out somewhere
public.

I brought back the RHEL repos here for simplicity; I'd like to keep as
much of the logic as possible right here. Though I'm open to changing
this back.

Add a Jenkinsfile that runs the treecompose and publishes it. Right now,
this is only running the `rhcos` variant, so it's publishing to some
place private. The next steps are to also build cloud images, and to
also build the `origin` CentOS-based variant and push that out somewhere
public.

I brought back the RHEL repos here for simplicity; I'd like to keep as
much of the logic as possible right here. Though I'm open to changing
this back.
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 8, 2018
Comment thread Jenkinsfile
def DOCKER_ARGS = "--net=host -v /srv:/srv --privileged"

// this var conveniently refers to a location on the server as well as the local dir we sync to/from
def repo = "${env.ARTIFACT_SERVER_DIR}/repo"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

quick question, where does this env variable get defined? Is it on the jenkins side? =)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's correct, this is defined on the Jenkins side since it depends on where it runs. We'll need to make this more flexible if we want to support e.g. GCS buckets.

@ashcrow
ashcrow self-requested a review May 9, 2018 12:41

@ashcrow ashcrow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One question before I 👍

Comment thread host-base.json
"dnsmasq",
"oci-umount"
"oci-umount",
"origin-node"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 for adding origin-node at this stage in development. Reminder to us all that this will be replaced with a node that is built upon upstream merges later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

To clarify, origin-node was in the main manifest before. This is a small revert of #2, which changed that to atomic-openshift-node for RHEL. So we might need to revert this -- the OpenShift repo we're using right now does have it though.

Comment thread Jenkinsfile
docker.image(DOCKER_IMG).inside(DOCKER_ARGS) {
stage("Provision") {
sh "dnf install -y git rpm-ostree rsync openssh-clients"
sh "cp RPM-GPG-* /etc/pki/rpm-gpg/"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks similar to what's happening in the Dockerfile but in this case it looks like it's doing it on the node. Am I reading this right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's correct. Since we're running in a Fedora container, we're not gonna have those keys available. I just copy them all since I'd like to generalize the Jenkinsfile to build both the rhcos and the origin variants.

@ashcrow

ashcrow commented May 9, 2018

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 9, 2018
@openshift-merge-robot
openshift-merge-robot merged commit 16a2d65 into openshift:master May 9, 2018
@ashcrow ashcrow mentioned this pull request May 9, 2018
@jlebon
jlebon deleted the pr/pipeline branch May 24, 2018 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants