copr-be: use copr-builder-rhsm-subscribe-daemon to activate subscription
See https://github.com/fedora-copr/copr/pull/3434 See https://github.com/fedora-copr/copr/pull/3426
This commit is contained in:
parent
e389d23f65
commit
1f55cc93f7
1 changed files with 25 additions and 43 deletions
|
@ -102,27 +102,39 @@
|
||||||
when:
|
when:
|
||||||
- preparing_image
|
- preparing_image
|
||||||
|
|
||||||
- name: install the subscription-manager script
|
- name: install copr-builder and other latest packages
|
||||||
copy:
|
dnf: state=latest pkg={{ packages }} disable_gpg_check=true
|
||||||
src: copr-rh-subscribe.sh
|
vars:
|
||||||
dest: /usr/local/bin/copr-rh-subscribe.sh
|
packages:
|
||||||
mode: 0755
|
- copr-builder
|
||||||
when:
|
- python3-copr-common
|
||||||
- preparing_image
|
# A new version of rpmlint fixes the following issue
|
||||||
|
# https://pagure.io/FedoraReview/issue/461
|
||||||
|
- rpmlint
|
||||||
|
# Tito 0.6.23 supports transitive submodule resolution
|
||||||
|
# Requested on IRC by @abn
|
||||||
|
- tito
|
||||||
|
# We want fedora-review 0.10.0 which generates `review.json` file
|
||||||
|
# This is important for the fedora-review-service
|
||||||
|
# https://github.com/FrostyX/fedora-review-service/issues/30
|
||||||
|
- fedora-review
|
||||||
|
# Per report from @smooge, https://github.com/fedora-copr/copr/issues/2953
|
||||||
|
- bc
|
||||||
|
# Just for testing purposes, we need copr-rpmbuild from main
|
||||||
|
- https://download.copr.fedorainfracloud.org/results/@copr/copr-dev/fedora-39-x86_64/08143605-copr-rpmbuild/copr-rpmbuild-1.0-1.git.21.271b9fa.fc39.x86_64.rpm
|
||||||
|
- https://download.copr.fedorainfracloud.org/results/@copr/copr-dev/fedora-39-x86_64/08143605-copr-rpmbuild/copr-builder-1.0-1.git.21.271b9fa.fc39.x86_64.rpm
|
||||||
|
|
||||||
- name: Activate Red Hat Subscription
|
- name: Activate Red Hat Subscription
|
||||||
shell:
|
shell:
|
||||||
cmd: >
|
cmd: >
|
||||||
/usr/local/bin/copr-rh-subscribe.sh
|
echo "{{ copr_rhsm_activation_key }}"
|
||||||
--pool-id 8a85f9a17c71102f017ce611251c770f
|
| /usr/bin/copr-builder-rhsm-subscribe-daemon
|
||||||
--user copr-team
|
"{{ copr_rhsm_org_id }}"
|
||||||
--pass "{{ copr_red_hat_subscription_password }}"
|
"{{ lookup('env', 'RESALLOC_NAME', default='unknown-builder') | replace('_', '-') }}"
|
||||||
--system "{{ lookup('env', 'RESALLOC_NAME', default='unknown-builder') | replace('_', '-') }}"
|
|
||||||
no_log: true
|
no_log: true
|
||||||
# run in the background, gather results later
|
# run in the background, gather results later
|
||||||
async: 300
|
async: 300
|
||||||
poll: 0
|
poll: 0
|
||||||
register: rh_subscribtion_task
|
|
||||||
when: starting_builder
|
when: starting_builder
|
||||||
|
|
||||||
- name: make sure the enable-swap service has already finished
|
- name: make sure the enable-swap service has already finished
|
||||||
|
@ -188,26 +200,6 @@
|
||||||
when:
|
when:
|
||||||
- starting_builder
|
- starting_builder
|
||||||
|
|
||||||
- name: install copr-builder and other latest packages
|
|
||||||
dnf: state=latest pkg={{ packages }}
|
|
||||||
vars:
|
|
||||||
packages:
|
|
||||||
- copr-builder
|
|
||||||
- python3-copr-common
|
|
||||||
# A new version of rpmlint fixes the following issue
|
|
||||||
# https://pagure.io/FedoraReview/issue/461
|
|
||||||
- rpmlint
|
|
||||||
# Tito 0.6.23 supports transitive submodule resolution
|
|
||||||
# Requested on IRC by @abn
|
|
||||||
- tito
|
|
||||||
# We want fedora-review 0.10.0 which generates `review.json` file
|
|
||||||
# This is important for the fedora-review-service
|
|
||||||
# https://github.com/FrostyX/fedora-review-service/issues/30
|
|
||||||
- fedora-review
|
|
||||||
# Per report from @smooge, https://github.com/fedora-copr/copr/issues/2953
|
|
||||||
- bc
|
|
||||||
|
|
||||||
|
|
||||||
- name: put updated mock configs into /etc/mock
|
- name: put updated mock configs into /etc/mock
|
||||||
copy: src=files/mock/ dest=/etc/copr-rpmbuild/mock-config-overrides
|
copy: src=files/mock/ dest=/etc/copr-rpmbuild/mock-config-overrides
|
||||||
# conditional, per https://pagure.io/copr/copr/issue/1189 - as we don't want
|
# conditional, per https://pagure.io/copr/copr/issue/1189 - as we don't want
|
||||||
|
@ -333,15 +325,5 @@
|
||||||
# this one is not hotfix though...
|
# this one is not hotfix though...
|
||||||
- copr-rpmbuild.yml
|
- copr-rpmbuild.yml
|
||||||
|
|
||||||
- name: Check that we have successfully finished the subscription
|
|
||||||
async_status:
|
|
||||||
jid: "{{ rh_subscribtion_task.ansible_job_id }}"
|
|
||||||
register: job_result
|
|
||||||
until: job_result.finished
|
|
||||||
retries: 100
|
|
||||||
delay: 2
|
|
||||||
when:
|
|
||||||
- starting_builder
|
|
||||||
|
|
||||||
- name: Set up motd for builder
|
- name: Set up motd for builder
|
||||||
shell: "copr-builder help > /etc/motd || :"
|
shell: "copr-builder help > /etc/motd || :"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue