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

Refactor COPR jobs for easier branching #376

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions branch-foreman
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ sed -i "/nightly/i \ \ \ \ \ \ - '${KATELLO_VERSION}'" centos.org/jobs/katello-p

echo "- '${FOREMAN_VERSION}'" >> theforeman.org/yaml/includes/foreman_versions.yaml.inc
Copy link
Member

Choose a reason for hiding this comment

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

if we're not doing koji releases anymore, can't this go?

(also, the file is now foreman_versions_koji, right?)

Copy link
Member Author

Choose a reason for hiding this comment

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

No, this is the file with all releases. It's also used for Debian and other stuff like smart-proxy-X.Y-stable-test & test_X_Y_stable.


echo "- '${FOREMAN_VERSION}'" >> theforeman.org/yaml/includes/foreman_versions_copr.yaml.inc

echo " - '${KATELLO_VERSION}'" >> theforeman.org/yaml/jobs/pipeline/katello-rpm-pipeline.yaml

# TODO This should be a templated pipeline
Expand Down
16 changes: 14 additions & 2 deletions centos.org/jobs/pulpcore-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
---
- project:
name: pulpcore
name: pulpcore-koji
jobs:
- 'foreman-pipeline-{type}-{flavor}-{version}'
empty: ''
version:
!include: ../../theforeman.org/yaml/includes/pulpcore_versions.yaml.inc
!include: ../../theforeman.org/yaml/includes/pulpcore_versions_koji.yaml.inc
type:
- pulpcore
flavor:
- rpm

- project:
name: pulpcore-copr
jobs:
- 'foreman-pipeline-{type}-{flavor}-{version}'
empty: ''
version:
!include: ../../theforeman.org/yaml/includes/pulpcore_versions_copr.yaml.inc
type:
- pulpcore
flavor:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Copy link
Member Author

Choose a reason for hiding this comment

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

This won't play well the first time, but if I left it empty then it failed to build. It'll easily show up in review if you add a line after this.

2 changes: 2 additions & 0 deletions theforeman.org/yaml/includes/foreman_versions_koji.yaml.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- '3.7'
- '3.8'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- 'nightly'
Copy link
Member

Choose a reason for hiding this comment

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

We can include '3.39' here as well, since we are going to branch from rpm/develop

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that's out of scope for this PR: we should treat 3.39 as a separate branching step. We already know https://github.com/theforeman/theforeman-rel-eng/blob/master/procedures/pulpcore/update.md.erb is out of date, so please keep notes when you do.

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
- '3.21'
- '3.22'
- '3.28'
- 'nightly'
Copy link
Member Author

Choose a reason for hiding this comment

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

AFAIK we don't build Pulp nightly in Koji anymore, so this can be cleaned up.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- github:
url: https://github.com/theforeman/foreman-packaging
triggers:
- github_pr_rpm:
- github_pr_rpm_koji_foreman:
context: 'rpm'
dsl:
!include-raw:
Expand All @@ -28,7 +28,7 @@
- github:
url: https://github.com/theforeman/foreman-packaging
triggers:
- github_pr_rpm_develop:
- github_pr_rpm_copr_foreman:
context: 'rpm-copr'
dsl:
!include-raw:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- github:
url: https://github.com/theforeman/pulpcore-packaging
triggers:
- github_pr_rpm:
- github_pr_rpm_koji_pulpcore:
context: 'rpm'
dsl:
!include-raw:
Expand All @@ -28,7 +28,7 @@
- github:
url: https://github.com/theforeman/pulpcore-packaging
triggers:
- github_pr_rpm_develop:
- github_pr_rpm_copr_pulpcore:
context: 'rpm-copr'
dsl:
!include-raw:
Expand Down
12 changes: 10 additions & 2 deletions theforeman.org/yaml/jobs/pipeline/pulpcore-release-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@
- 'pipelines/lib/foreman_infra.groovy{empty}'

- project:
name: pulpcore
name: pulpcore-koji
jobs:
- 'pulpcore-{version}-rpm-pipeline'
empty: ''
version:
!include: ../../includes/pulpcore_versions.yaml.inc
!include: ../../includes/pulpcore_versions_koji.yaml.inc

- project:
name: pulpcore-copr
jobs:
- 'pulpcore-{version}-rpm-pipeline'
empty: ''
version:
!include: ../../includes/pulpcore_versions_copr.yaml.inc

This file was deleted.

80 changes: 80 additions & 0 deletions theforeman.org/yaml/jobs/release/foreman-packaging-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
- job-template:
name: 'foreman-packaging-{packaging_label}-{version}-release'
project-type: pipeline
sandbox: true
concurrent: false
properties:
- github:
url: https://github.com/theforeman/foreman-packaging
triggers:
- github
dsl:
!include-raw:
- 'pipelines/vars/foreman/{version}.groovy'
- 'pipelines/release/foreman_packaging_{packaging_type}_release.groovy{empty}'
- 'pipelines/lib/git.groovy{empty}'
- 'pipelines/lib/ansible.groovy{empty}'
- 'pipelines/lib/obal.groovy{empty}'
- 'pipelines/lib/packaging.groovy{empty}'
- 'pipelines/lib/foreman_infra.groovy{empty}'

- project:
name: foreman-packaging-deb
jobs:
- 'foreman-packaging-{packaging_label}-{version}-release'
empty: ''
packaging_label: deb
packaging_type: deb
version:
!include: ../../includes/foreman_versions.yaml.inc

- project:
name: foreman-packaging-rpm-koji-release
jobs:
- 'foreman-packaging-{packaging_label}-{version}-release'
empty: ''
packaging_label: rpm
packaging_type: rpm
version:
!include: ../../includes/foreman_versions_koji.yaml.inc

- project:
name: foreman-packaging-rpm-copr-release
jobs:
- 'foreman-packaging-{packaging_label}-{version}-release'
empty: ''
packaging_label: rpm
packaging_type: rpm_copr
version:
!include: ../../includes/foreman_versions_copr.yaml.inc

- project:
name: foreman-packaging-deb-nightly
jobs:
- 'foreman-packaging-{packaging_label}-{version}-release'
empty: ''
packaging_label: deb
packaging_type: deb
version:
- 'nightly'

- project:
name: foreman-packaging-rpm-koji-nightly
jobs:
- 'foreman-packaging-{packaging_label}-{version}-release'
empty: ''
packaging_label: rpm
packaging_type: rpm
version:
- 'nightly'

- project:
name: foreman-packaging-rpm-copr-nightly
jobs:
- 'foreman-packaging-{packaging_label}-{version}-release'
empty: ''
packaging_label: rpm-copr
packaging_type: rpm_copr
version:
- 'nightly'

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@
- 'pipelines/lib/foreman_infra.groovy{empty}'

- project:
name: pulpcore-packaging
name: pulpcore-packaging-rpm-koji
jobs:
- 'pulpcore-packaging-rpm-{version}-release'
empty: ''
version:
!include: ../../includes/pulpcore_versions.yaml.inc
!include: ../../includes/pulpcore_versions_koji.yaml.inc

- project:
name: pulpcore-packaging-rpm-copr
jobs:
- 'pulpcore-packaging-rpm-copr-{version}-release'
empty: ''
version:
!include: ../../includes/pulpcore_versions_copr.yaml.inc

- job-template:
name: 'pulpcore-packaging-rpm-copr-{version}-release'
Expand All @@ -46,11 +54,3 @@
- 'pipelines/lib/obal.groovy{empty}'
- 'pipelines/lib/packaging.groovy{empty}'
- 'pipelines/lib/foreman_infra.groovy{empty}'

- project:
name: pulpcore-packaging-rpm-copr-nightly
jobs:
- 'pulpcore-packaging-rpm-copr-{version}-release'
empty: ''
version:
- 'nightly'
27 changes: 24 additions & 3 deletions theforeman.org/yaml/triggers/github_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,42 @@
- deb/.*

- trigger:
name: github_pr_rpm
name: github_pr_rpm_koji_foreman
triggers:
- github-pull-request:
<<: *ghprb_defaults
status-url: https://ci.theforeman.org/blue/organizations/jenkins/$JOB_NAME/detail/$JOB_NAME/$BUILD_ID/pipeline
white-list-target-branches:
- rpm/.*
- rpm/3\.[0-8]+

- trigger:
name: github_pr_rpm_develop
name: github_pr_rpm_koji_pulpcore
triggers:
- github-pull-request:
<<: *ghprb_defaults
status-url: https://ci.theforeman.org/blue/organizations/jenkins/$JOB_NAME/detail/$JOB_NAME/$BUILD_ID/pipeline
white-list-target-branches:
- rpm/3\.[0-2][0-9]

- trigger:
name: github_pr_rpm_copr_foreman
triggers:
- github-pull-request:
<<: *ghprb_defaults
status-url: https://ci.theforeman.org/blue/organizations/jenkins/$JOB_NAME/detail/$JOB_NAME/$BUILD_ID/pipeline
white-list-target-branches:
- rpm/3\.9
- rpm/3\.1[0-9]+
- rpm/develop

- trigger:
name: github_pr_rpm_copr_pulpcore
triggers:
- github-pull-request:
<<: *ghprb_defaults
status-url: https://ci.theforeman.org/blue/organizations/jenkins/$JOB_NAME/detail/$JOB_NAME/$BUILD_ID/pipeline
white-list-target-branches:
- rpm/3\.[3-9][0-9]
- rpm/develop

- trigger:
Expand Down