-
Notifications
You must be signed in to change notification settings - Fork 2
107 lines (101 loc) · 3.31 KB
/
package-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
name: Sync package repositories
on:
workflow_call:
inputs:
sync_ark:
description: Sync package repositories in Ark
type: boolean
required: true
sync_test:
description: Sync package repositories in Test Pulp
type: boolean
required: true
package_sync_group:
description: String matching sync_group of repositories to sync
type: string
required: false
default: ""
workflow_dispatch:
inputs:
sync_ark:
required: false
description: Sync package repositories in Ark
default: true
type: boolean
sync_test:
required: false
description: Sync package repositories in Test Pulp
default: false
type: boolean
filter:
description: Space-separated list of regular expressions matching short_name of repositories to sync
type: string
required: false
default: ""
env:
ANSIBLE_FORCE_COLOR: True
ANSIBLE_VAULT_PASSWORD_FILE: ${{ github.workspace }}/vault-pass
jobs:
package-sync-ark:
name: Sync package repositories in Ark
runs-on: arc-release-train-runner
timeout-minutes: 480
if: inputs.sync_ark
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Release Train & dependencies
uses: ./.github/actions/setup
with:
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }}
- name: Sync and publish package repositories in Ark
uses: nick-fields/retry@v3
with:
timeout_minutes: 360
max_attempts: 2
command: |
ansible-playbook -i ansible/inventory \
ansible/dev-pulp-repo-sync.yml \
ansible/dev-pulp-repo-publication-cleanup.yml \
ansible/dev-pulp-repo-publish.yml \
-e package_sync_group="'$PACKAGE_SYNC_GROUP'" \
-e deb_package_repo_filter="'$FILTER'" \
-e rpm_package_repo_filter="'$FILTER'"
retry_wait_seconds: 3600
env:
FILTER: ${{ inputs.filter }}
PACKAGE_SYNC_GROUP: ${{ inputs.package_sync_group }}
package-sync-test:
name: Sync package repositories in test
runs-on: arc-release-train-runner
needs: package-sync-ark
timeout-minutes: 480
if: inputs.sync_test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Release Train & dependencies
uses: ./.github/actions/setup
with:
vault-password: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
vault-password-file: ${{ env.ANSIBLE_VAULT_PASSWORD_FILE }}
- name: Sync and publish package repositories in test
uses: nick-fields/retry@v3
with:
timeout_minutes: 360
max_attempts: 2
command: |
ansible-playbook -i ansible/inventory \
ansible/test-pulp-repo-version-query.yml \
ansible/test-pulp-repo-sync.yml \
ansible/test-pulp-repo-publication-cleanup.yml \
ansible/test-pulp-repo-publish.yml \
-e package_sync_group="'$PACKAGE_SYNC_GROUP'" \
-e deb_package_repo_filter="'$FILTER'" \
-e rpm_package_repo_filter="'$FILTER'"
retry_wait_seconds: 3600
env:
FILTER: ${{ inputs.filter }}
PACKAGE_SYNC_GROUP: ${{ inputs.package_sync_group }}