forked from rpms/leapp-repository
268 lines
11 KiB
Diff
268 lines
11 KiB
Diff
From c7ea9fc29989a37071bf6355828328910b6b5e1d Mon Sep 17 00:00:00 2001
|
|
From: Daniel Diblik <ddiblik@redhat.com>
|
|
Date: Tue, 17 Jun 2025 15:21:15 +0200
|
|
Subject: [PATCH 44/66] Remove obsolete workflows
|
|
|
|
* tmt-tests.yml and reuse-copr-build.yml were replaced by the Packit
|
|
workflows ages ago
|
|
* removed the obsolete workflows
|
|
|
|
Signed-off-by: Daniel Diblik <ddiblik@redhat.com>
|
|
---
|
|
.github/workflows/reuse-copr-build.yml | 163 -------------------------
|
|
.github/workflows/tmt-tests.yml | 72 -----------
|
|
2 files changed, 235 deletions(-)
|
|
delete mode 100644 .github/workflows/reuse-copr-build.yml
|
|
delete mode 100644 .github/workflows/tmt-tests.yml
|
|
|
|
diff --git a/.github/workflows/reuse-copr-build.yml b/.github/workflows/reuse-copr-build.yml
|
|
deleted file mode 100644
|
|
index a772fb64..00000000
|
|
--- a/.github/workflows/reuse-copr-build.yml
|
|
+++ /dev/null
|
|
@@ -1,163 +0,0 @@
|
|
-name: reuse-copr-build@TF
|
|
-
|
|
-on:
|
|
- workflow_call:
|
|
- secrets:
|
|
- FEDORA_COPR_LOGIN:
|
|
- required: true
|
|
- FEDORA_COPR_TOKEN:
|
|
- required: true
|
|
- outputs:
|
|
- artifacts:
|
|
- description: "A string with test artifacts to install in tft test env"
|
|
- value: ${{ jobs.reusable_workflow_copr_build_job.outputs.artifacts }}
|
|
-
|
|
-jobs:
|
|
- reusable_workflow_copr_build_job:
|
|
- # This job only runs for '/rerun' pull request comments by owner, member, or collaborator of the repo/organization.
|
|
- name: Build copr builds for tft tests
|
|
- runs-on: ubuntu-24.04
|
|
- outputs:
|
|
- artifacts: ${{ steps.gen_artifacts.outputs.artifacts }}
|
|
- if: |
|
|
- github.event.issue.pull_request
|
|
- && startsWith(github.event.comment.body, '/rerun')
|
|
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
|
- steps:
|
|
- - name: Update repository
|
|
- id: repo_update
|
|
- run: sudo apt-get update
|
|
-
|
|
- - name: Install necessary deps
|
|
- id: deps_install
|
|
- run: sudo apt-get install -y libkrb5-dev
|
|
-
|
|
- - name: Get pull request number
|
|
- id: pr_nr
|
|
- run: |
|
|
- PR_URL="${{ github.event.comment.issue_url }}"
|
|
- echo "::set-output name=pr_nr::${PR_URL##*/}"
|
|
-
|
|
- - name: Checkout
|
|
- # TODO: The correct way to checkout would be to use similar approach as in get_commit_by_timestamp function of
|
|
- # the github gluetool module (i.e. do not use HEAD but the last commit before comment).
|
|
- id: checkout
|
|
- uses: actions/checkout@v4
|
|
- with:
|
|
- ref: "refs/pull/${{ steps.pr_nr.outputs.pr_nr }}/head"
|
|
-
|
|
- - name: Get ref and sha
|
|
- id: ref_sha
|
|
- run: |
|
|
- echo "::set-output name=sha::$(git rev-parse --short HEAD)"
|
|
- echo "::set-output name=ref::refs/pull/${{ steps.pr_nr.outputs.pr_nr }}/head"
|
|
-
|
|
- - name: Trigger copr build
|
|
- id: copr_build
|
|
- env:
|
|
- COPR_CONFIG: "copr_fedora.conf"
|
|
- COPR_CHROOT: "epel-8-x86_64"
|
|
- COPR_REPO: "@oamg/leapp"
|
|
- run: |
|
|
- cat << EOF > $COPR_CONFIG
|
|
- [copr-cli]
|
|
- login = ${{ secrets.FEDORA_COPR_LOGIN }}
|
|
- username = oamgbot
|
|
- token = ${{ secrets.FEDORA_COPR_TOKEN }}
|
|
- copr_url = https://copr.fedorainfracloud.org
|
|
- # expiration date: 2030-07-04
|
|
- EOF
|
|
-
|
|
- pip install copr-cli
|
|
- PR=${{ steps.pr_nr.outputs.pr_nr }} COPR_CONFIG=$COPR_CONFIG COPR_REPO="$COPR_REPO" COPR_CHROOT=$COPR_CHROOT make copr_build | tee copr.log
|
|
-
|
|
- COPR_URL=$(grep -Po 'https://copr.fedorainfracloud.org/coprs/build/\d+' copr.log)
|
|
- echo "::set-output name=copr_url::${COPR_URL}"
|
|
- echo "::set-output name=copr_id::${COPR_URL##*/}"
|
|
-
|
|
- - name: Add comment with copr build url
|
|
- # TODO: Create comment when copr build fails.
|
|
- id: link_copr
|
|
- uses: actions/github-script@v7
|
|
- with:
|
|
- script: |
|
|
- github.issues.createComment({
|
|
- issue_number: context.issue.number,
|
|
- owner: context.repo.owner,
|
|
- repo: context.repo.repo,
|
|
- body: 'Copr build succeeded: ${{ steps.copr_build.outputs.copr_url }}'
|
|
- })
|
|
-
|
|
- - name: Get dependent leapp pr number from rerun comment
|
|
- uses: actions-ecosystem/action-regex-match@v2
|
|
- id: leapp_pr_regex_match
|
|
- with:
|
|
- text: ${{ github.event.comment.body }}
|
|
- regex: '^/(rerun|rerun-sst)\s+([0-9]+)\s*$'
|
|
-
|
|
- - name: If leapp_pr was specified in the comment - trigger copr build
|
|
- # TODO: XXX FIXME This should schedule copr build for leapp but for now it will be just setting an env var
|
|
- id: leapp_pr
|
|
- if: ${{ steps.leapp_pr_regex_match.outputs.match != '' }}
|
|
- run: |
|
|
- echo "::set-output name=leapp_pr::${{ steps.leapp_pr_regex_match.outputs.group2 }}"
|
|
-
|
|
- - name: Checkout leapp
|
|
- id: checkout_leapp
|
|
- if: ${{ steps.leapp_pr_regex_match.outputs.match != '' }}
|
|
- uses: actions/checkout@v4
|
|
- with:
|
|
- repository: "oamg/leapp"
|
|
- ref: "refs/pull/${{ steps.leapp_pr.outputs.leapp_pr }}/head"
|
|
-
|
|
- - name: Get ref and sha for leapp
|
|
- id: ref_sha_leapp
|
|
- if: ${{ steps.leapp_pr_regex_match.outputs.match != '' }}
|
|
- run: |
|
|
- echo "::set-output name=sha::$(git rev-parse --short HEAD)"
|
|
- echo "::set-output name=ref::refs/pull/${{ steps.leapp_pr.outputs.leapp_pr }}/head"
|
|
-
|
|
- - name: Trigger copr build for leapp
|
|
- id: copr_build_leapp
|
|
- if: ${{ steps.leapp_pr_regex_match.outputs.match != '' }}
|
|
- env:
|
|
- COPR_CONFIG: "copr_fedora.conf"
|
|
- COPR_CHROOT: "epel-8-x86_64"
|
|
- COPR_REPO: "@oamg/leapp"
|
|
- run: |
|
|
- cat << EOF > $COPR_CONFIG
|
|
- [copr-cli]
|
|
- login = ${{ secrets.FEDORA_COPR_LOGIN }}
|
|
- username = oamgbot
|
|
- token = ${{ secrets.FEDORA_COPR_TOKEN }}
|
|
- copr_url = https://copr.fedorainfracloud.org
|
|
- # expiration date: 2030-07-04
|
|
- EOF
|
|
-
|
|
- pip install copr-cli
|
|
- PR=${{ steps.leapp_pr.outputs.leapp_pr }} COPR_CONFIG=$COPR_CONFIG COPR_REPO="$COPR_REPO" COPR_CHROOT=$COPR_CHROOT make copr_build | tee copr.log
|
|
-
|
|
- COPR_URL=$(grep -Po 'https://copr.fedorainfracloud.org/coprs/build/\d+' copr.log)
|
|
- echo "::set-output name=copr_url::${COPR_URL}"
|
|
- echo "::set-output name=copr_id::${COPR_URL##*/}"
|
|
-
|
|
- - name: Add comment with copr build url for leapp
|
|
- # TODO: Create comment when copr build fails.
|
|
- id: link_copr_leapp
|
|
- if: ${{ steps.leapp_pr_regex_match.outputs.match != '' }}
|
|
- uses: actions/github-script@v7
|
|
- with:
|
|
- script: |
|
|
- github.issues.createComment({
|
|
- issue_number: context.issue.number,
|
|
- owner: context.repo.owner,
|
|
- repo: context.repo.repo,
|
|
- body: 'Copr build succeeded: ${{ steps.copr_build_leapp.outputs.copr_url }}'
|
|
- })
|
|
-
|
|
- - name: Generate artifacts output
|
|
- id: gen_artifacts
|
|
- env:
|
|
- ARTIFACTS: ${{ steps.leapp_pr_regex_match.outputs.match != '' && format('{0};{1}', steps.copr_build_leapp.outputs.copr_id, steps.copr_build.outputs.copr_id) || steps.copr_build.outputs.copr_id }}
|
|
- run: |
|
|
- echo "::set-output name=artifacts::${{ env.ARTIFACTS }}"
|
|
diff --git a/.github/workflows/tmt-tests.yml b/.github/workflows/tmt-tests.yml
|
|
deleted file mode 100644
|
|
index c9f76ef7..00000000
|
|
--- a/.github/workflows/tmt-tests.yml
|
|
+++ /dev/null
|
|
@@ -1,72 +0,0 @@
|
|
-name: tmt@TF
|
|
-
|
|
-on:
|
|
- issue_comment:
|
|
- types:
|
|
- - created
|
|
-
|
|
-jobs:
|
|
- call_workflow_copr_build:
|
|
- uses: ./.github/workflows/reuse-copr-build.yml
|
|
- secrets: inherit
|
|
-
|
|
- call_workflow_tests_86to90_integration:
|
|
- needs: call_workflow_copr_build
|
|
- uses: oamg/leapp/.github/workflows/reuse-tests-8to9.yml@main
|
|
- secrets: inherit
|
|
- with:
|
|
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
|
- tmt_plan_regex: "^(?!.*max_sst)(.*tier1)"
|
|
- variables: 'SOURCE_RELEASE=8.6;TARGET_RELEASE=9.0;TARGET_KERNEL=el9;RHSM_REPOS=rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms;LEAPPDATA_BRANCH=upstream'
|
|
- pull_request_status_name: "8.6to9.0"
|
|
- if: |
|
|
- github.event.issue.pull_request
|
|
- && ! startsWith(github.event.comment.body, '/rerun-sst')
|
|
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
|
-
|
|
- call_workflow_tests_88to92_integration:
|
|
- needs: call_workflow_copr_build
|
|
- uses: oamg/leapp/.github/workflows/reuse-tests-8to9.yml@main
|
|
- secrets: inherit
|
|
- with:
|
|
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
|
- tmt_plan_regex: "^(?!.*max_sst)(.*tier1)"
|
|
- variables: 'SOURCE_RELEASE=8.8;TARGET_RELEASE=9.2;TARGET_KERNEL=el9;RHSM_REPOS=rhel-8-for-x86_64-appstream-rpms,rhel-8-for-x86_64-baseos-rpms;LEAPPDATA_BRANCH=upstream'
|
|
- compose: "RHEL-8.8.0-Nightly"
|
|
- pull_request_status_name: "8.8to9.2"
|
|
- tmt_context: "distro=rhel-8.8"
|
|
- if: |
|
|
- github.event.issue.pull_request
|
|
- && ! startsWith(github.event.comment.body, '/rerun-sst')
|
|
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
|
-
|
|
- call_workflow_tests_86to90_sst:
|
|
- needs: call_workflow_copr_build
|
|
- uses: oamg/leapp/.github/workflows/reuse-tests-8to9.yml@main
|
|
- secrets: inherit
|
|
- with:
|
|
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
|
- tmt_plan_regex: "^(?!.*tier[2-3].*)(.*max_sst.*)"
|
|
- variables: 'SOURCE_RELEASE=8.6;TARGET_RELEASE=9.0;TARGET_KERNEL=el9;RHSM_REPOS=rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms;LEAPPDATA_BRANCH=upstream'
|
|
- pull_request_status_name: "8to9-sst"
|
|
- update_pull_request_status: 'false'
|
|
- if: |
|
|
- github.event.issue.pull_request
|
|
- && startsWith(github.event.comment.body, '/rerun-sst')
|
|
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
|
-
|
|
- call_workflow_tests_86to90_aws:
|
|
- needs: call_workflow_copr_build
|
|
- uses: oamg/leapp/.github/workflows/reuse-tests-8to9.yml@main
|
|
- secrets: inherit
|
|
- with:
|
|
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
|
|
- tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*7to8)(.*e2e)"
|
|
- compose: "RHEL-8.6-rhui"
|
|
- environment_settings: '{"provisioning": {"post_install_script": "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"}}'
|
|
- pull_request_status_name: "8to9-aws-e2e"
|
|
- variables: 'SOURCE_RELEASE=8.6;TARGET_RELEASE=9.0;TARGET_KERNEL=el9;RHSM_REPOS=rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms;RHUI=aws;LEAPPDATA_BRANCH=upstream'
|
|
- if: |
|
|
- github.event.issue.pull_request
|
|
- && ! startsWith(github.event.comment.body, '/rerun-sst')
|
|
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
|
|
--
|
|
2.50.1
|
|
|