Skip to content

Sync package repositories #717

Sync package repositories

Sync package repositories #717

Workflow file for this run

---
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 }}
- name: Send message to Slack via Workflow Builder
uses: ./.github/actions/slack-alert
with:
inputs: >-
filter: ${{ inputs.filter }}\n
sync_ark: ${{ inputs.sync_ark }}\n
sync_test: ${{ inputs.sync_test }}\n
package_sync_group: ${{ inputs.package_sync_group }}\n
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
if: failure()
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 }}
- name: Send message to Slack via Workflow Builder
uses: ./.github/actions/slack-alert
with:
inputs: >-
filter: ${{ inputs.filter }}\n
sync_ark: ${{ inputs.sync_ark }}\n
sync_test: ${{ inputs.sync_test }}\n
package_sync_group: ${{ inputs.package_sync_group }}\n
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
if: failure()