diff --git a/branch-foreman b/branch-foreman index 94cbb80d..9aaf2c55 100755 --- a/branch-foreman +++ b/branch-foreman @@ -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 +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 diff --git a/theforeman.org/yaml/includes/foreman_versions_copr.yaml.inc b/theforeman.org/yaml/includes/foreman_versions_copr.yaml.inc new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/theforeman.org/yaml/includes/foreman_versions_copr.yaml.inc @@ -0,0 +1 @@ +[] diff --git a/theforeman.org/yaml/includes/foreman_versions_koji.yaml.inc b/theforeman.org/yaml/includes/foreman_versions_koji.yaml.inc new file mode 100644 index 00000000..08e95c39 --- /dev/null +++ b/theforeman.org/yaml/includes/foreman_versions_koji.yaml.inc @@ -0,0 +1,2 @@ +- '3.7' +- '3.8' diff --git a/theforeman.org/yaml/jobs/packaging/foreman-packaging-rpm-pr-test.yaml b/theforeman.org/yaml/jobs/packaging/foreman-packaging-rpm-pr-test.yaml index 3c40e327..9187b2a4 100644 --- a/theforeman.org/yaml/jobs/packaging/foreman-packaging-rpm-pr-test.yaml +++ b/theforeman.org/yaml/jobs/packaging/foreman-packaging-rpm-pr-test.yaml @@ -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: @@ -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: diff --git a/theforeman.org/yaml/jobs/packaging/pulpcore-packaging-rpm-pr-test.yaml b/theforeman.org/yaml/jobs/packaging/pulpcore-packaging-rpm-pr-test.yaml index 0943521d..4798222e 100644 --- a/theforeman.org/yaml/jobs/packaging/pulpcore-packaging-rpm-pr-test.yaml +++ b/theforeman.org/yaml/jobs/packaging/pulpcore-packaging-rpm-pr-test.yaml @@ -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: @@ -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: diff --git a/theforeman.org/yaml/jobs/release/foreman-packaging-deb-release.yaml b/theforeman.org/yaml/jobs/release/foreman-packaging-deb-release.yaml deleted file mode 100644 index 0c76f55c..00000000 --- a/theforeman.org/yaml/jobs/release/foreman-packaging-deb-release.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- job-template: - name: 'foreman-packaging-deb-{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_deb_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-deb-{version}-release' - empty: '' - version: - !include: ../../includes/foreman_versions.yaml.inc - -- project: - name: foreman-packaging-deb-nightly - jobs: - - 'foreman-packaging-deb-{version}-release' - empty: '' - version: - - 'nightly' diff --git a/theforeman.org/yaml/jobs/release/foreman-packaging-release.yaml b/theforeman.org/yaml/jobs/release/foreman-packaging-release.yaml new file mode 100644 index 00000000..b936e9f0 --- /dev/null +++ b/theforeman.org/yaml/jobs/release/foreman-packaging-release.yaml @@ -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' diff --git a/theforeman.org/yaml/jobs/release/foreman-packaging-rpm-release.yaml b/theforeman.org/yaml/jobs/release/foreman-packaging-rpm-release.yaml deleted file mode 100644 index 42cc9d56..00000000 --- a/theforeman.org/yaml/jobs/release/foreman-packaging-rpm-release.yaml +++ /dev/null @@ -1,64 +0,0 @@ ---- -- job-template: - name: 'foreman-packaging-rpm-{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_rpm_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-rpm - jobs: - - 'foreman-packaging-rpm-{version}-release' - empty: '' - version: - !include: ../../includes/foreman_versions.yaml.inc - -- project: - name: foreman-packaging-rpm-nightly - jobs: - - 'foreman-packaging-rpm-{version}-release' - empty: '' - version: - - 'nightly' - -- job-template: - name: 'foreman-packaging-rpm-copr-{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_rpm_copr_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-rpm-copr-nightly - jobs: - - 'foreman-packaging-rpm-copr-{version}-release' - empty: '' - version: - - 'nightly' diff --git a/theforeman.org/yaml/triggers/github_pr.yaml b/theforeman.org/yaml/triggers/github_pr.yaml index 0c323657..cb6cca83 100644 --- a/theforeman.org/yaml/triggers/github_pr.yaml +++ b/theforeman.org/yaml/triggers/github_pr.yaml @@ -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: