Skip to content
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

Add release view templates #176

Merged
merged 1 commit into from Mar 4, 2022
Merged

Add release view templates #176

merged 1 commit into from Mar 4, 2022

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Feb 9, 2022

This adds templated views for releases which makes it easier to have the correct version tabs for a quick overview.

Currently untested. I've followed https://docs.openstack.org/infra/jenkins-job-builder/definition.html#views but I don't know if this will start to purge unmanaged views.

Fixes #169

- '1'

- view:
name: 'Foreman Nightly'
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this line and each below need to be indented

- project:
name: 'foreman-releases'
views:
- '{name}-template-{major}.{minor}'
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs to match the name: defined on https://github.com/theforeman/jenkins-jobs/pull/176/files#diff-b6bd4b212bdd5eae7e1f14909bf3b48d97db0a2b5d14afd613c56b60ddc54528R2 in order for it to link them up properly

This adds templated views for releases which makes it easier to have the
correct version tabs for a quick overview.
@ekohl
Copy link
Member Author

ekohl commented Mar 3, 2022

At least the tests are green now. When we deploy this, I don't know whether it'll remove all non-managed views or if we don't purge those.

@ehelms
Copy link
Member

ehelms commented Mar 3, 2022

We run update --delete-old -r . which to my understanding only purges jobs and views that were previously managed by JJB. Given none of our views are currently, I do not think this will delete any of the existing views.

The update command includes a delete-old option to remove obsolete jobs:
jenkins-jobs update --delete-old /path/to/defs
Obsolete jobs are jobs once managed by JJB (as distinguished by a special comment that JJB appends to their description), that were not generated in this JJB run.

https://jenkins-job-builder.readthedocs.io/en/latest/execution.html?highlight=delete-old#deleting-jobs-views

@ekohl ekohl merged commit 8d2de66 into theforeman:master Mar 4, 2022
@ekohl ekohl deleted the release-views branch March 4, 2022 11:05
@ekohl
Copy link
Member Author

ekohl commented Mar 4, 2022

Doesn't look like it's starting to manage views:
https://ci.theforeman.org/job/jenkins-jobs-update/165/console
However, it did fail on one job. Looking at the Jenkins logs:

WARNING hudson.triggers.Trigger#checkTriggers: The job katello-pr-test has a syntactically incorrect config and is missing the cron spec for a trigger

So it probably doesn't proceed with views until that's fixed.

@ekohl
Copy link
Member Author

ekohl commented Mar 4, 2022

Ok, so I had to:

  • Edit katello-pr-test and save it in the UI
  • Add permissions for the JJB user to manage views

Now we have views:
https://ci.theforeman.org/view/Nightly/ vs https://ci.theforeman.org/view/Foreman%20Nightly/

The former does have a list of unstable jobs, which can be quite useful. And the description may not be that useful and only takes up space.

@ehelms
Copy link
Member

ehelms commented Mar 4, 2022

The former does have a list of unstable jobs, which can be quite useful

Is this something that can be denoted in JJB to include?

Now that this is working - is our follow up to put the rest of the views into code?

@ekohl
Copy link
Member Author

ekohl commented Mar 4, 2022

Is this something that can be denoted in JJB to include?

I haven't checked yet

Now that this is working - is our follow up to put the rest of the views into code?

Yes, I do think that would be a good thing. It would remove yet another piece of manually managed Jenkins.

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.

templated release test jobs
2 participants