-
Notifications
You must be signed in to change notification settings - Fork 10
SET-1115 Automate Jenkins update process #257
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
base: main
Are you sure you want to change the base?
Conversation
ansible.builtin.replace: | ||
path: "{{ hephaestus_dir }}/Dockerfile" | ||
regexp: '^FROM jenkins/jenkins:.*$' | ||
replace: "FROM jenkins/jenkins:{{ jenkins_version }}" |
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.
🤣
@RanabirChakraborty just do a PR against Ares to change that!
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.
If we change ares to FROM jenkins/jenkins:{{ jenkins_version }}
once the jenkins version update it done, it'll be like that only locally in olympus Next time, it'll be difficult to change the version for that we have to fetch/update ares or make it like before again.
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.
@RanabirChakraborty No, you misunderstand me.
I meant change the Dockerfile is Ares to make the version a parameter:
ARG jenkins_version
FROM jenkins/jenkins:$jenkins_version
Then we don't need to modify the file in ares (which will prevent having to constantly add a commit to Ares everytime we update jenkins.
@@ -0,0 +1,72 @@ | |||
--- |
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 file should NOT live in its folder, in the root folder, but inside the playbooks/ folder.
- vars.yml | ||
|
||
tasks: | ||
- name: "Replace Jenkins version in Dockerfile" |
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.
I would add a callt o assert: to double check the required parameter (mostly the jenkins_version) are indeed defined.
(and I would remove the default value for this variable)
name: hephaestus.next | ||
tag: latest | ||
path: "{{ hephaestus_dir }}" | ||
register: image_build |
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.
You need to pass the value of jenkins_version as argument to the (underlying) podman command. As this stands, it will build the image based on the default value for jenkins_version (in the Dockerfile, if any) rather than the one specified in jenkins_version.
7493bb3
to
5ebfd4e
Compare
Issue: https://issues.redhat.com/browse/SET-1115