Add recording rule to collect migrations data to telemetry. #3093
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: openstack-extended-tests | |
on: | |
workflow_dispatch: | |
name: | |
description: 'run e2e openstack extended tests on a self hosted runner' | |
workflow_call: | |
issue_comment: | |
types: [ created ] | |
# ensures that only a single workflow will run at the same time | |
# if another workflow triggered it will be pending until first completion. | |
concurrency: | |
group: hosted-e2e | |
# A workflow run is made up of one or more jobs that can run sequentially | |
jobs: | |
create_ovirt_runner: | |
if: github.event_name == 'workflow_dispatch' || | |
( github.event_name == 'issue_comment' && | |
startsWith(github.event.comment.body, '/test-osp-extended') && ( | |
github.event.comment.author_association == 'MEMBER' || | |
github.event.comment.author_association == 'COLLABORATOR') | |
) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get PR branch | |
uses: xt0rted/pull-request-comment-branch@v2 | |
id: comment-branch | |
if: github.event_name == 'issue_comment' | |
- name: Set latest commit status as pending | |
if: github.event_name == 'issue_comment' | |
uses: myrotvorets/set-commit-status-action@master | |
with: | |
sha: ${{ steps.comment-branch.outputs.head_sha }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: pending | |
- name: Checkout forklift | |
uses: actions/checkout@v4 | |
- name: prepare the secrets | |
uses: kubev2v/forkliftci/ci/prepare-ansible-secrets@v6.0 | |
with: | |
OKD_ENGINE_SECRETS: ${{ secrets.OKD_ENGINE_SECRETS }} | |
OKD_SSH_KEY: ${{ secrets.OKD_SSH_KEY }} | |
- name: provision self hosted runner | |
uses: kubev2v/forkliftci/ci/create-self-runner@v6.0 | |
- name: Set latest commit status as ${{ job.status }} | |
uses: myrotvorets/set-commit-status-action@master | |
if: ${{ failure() || cancelled() }} | |
with: | |
sha: ${{ steps.comment-branch.outputs.head_sha }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: ${{ job.status }} | |
ci_setup: | |
runs-on: self-hosted | |
needs: create_ovirt_runner | |
env: | |
USE_BAZEL_VERSION: 5.4.0 | |
source_provider: openstack | |
timeout-minutes: 45 | |
steps: | |
- name: Checkout forklift | |
uses: actions/checkout@v4 | |
with: | |
path: forklift | |
- name: Checkout forkliftci | |
uses: actions/checkout@v4 | |
with: | |
repository: kubev2v/forkliftci | |
ref: v6.0 | |
- name: build and setup everything | |
uses: kubev2v/forkliftci/ci/build-and-setup@v6.0 | |
with: | |
provider_name: openstack | |
gh_access_token: ${{ secrets.GITHUB_TOKEN }} | |
enable_openstack_ssl: true | |
- run: kubectl version | |
- run: kubectl get pods -n konveyor-forklift | |
- name: run e2e-sanity-openstack extended | |
uses: kubev2v/forkliftci/ci/run-suite@v6.0 | |
with: | |
suite_name: e2e-sanity-openstack-extended | |
- name: run e2e-sanity-openstack migration | |
uses: kubev2v/forkliftci/ci/run-suite@v6.0 | |
with: | |
suite_name: e2e-sanity-openstack | |
- name: save k8s logs and upload-artifact | |
if: ${{ always() }} | |
uses: kubev2v/forkliftci/ci/save-artifacts@v6.0 | |
with: | |
source_provider: openstack | |
- name: Get PR branch | |
if: always() && github.event_name == 'issue_comment' | |
uses: xt0rted/pull-request-comment-branch@v2 | |
id: comment-branch | |
- name: Set latest commit status as ${{ job.status }} | |
uses: myrotvorets/set-commit-status-action@master | |
if: always() && github.event_name == 'issue_comment' | |
with: | |
sha: ${{ steps.comment-branch.outputs.head_sha }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: ${{ job.status }} | |
- name: Add comment to PR | |
uses: actions/github-script@v7 | |
if: always() && github.event_name == 'issue_comment' | |
with: | |
script: | | |
const name = '${{ github.workflow }}'; | |
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'; | |
const success = '${{ job.status }}' === 'success'; | |
const body = `${name}: ${success ? 'succeeded ✅' : 'failed ❌'}\n${url}`; | |
await github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: body | |
}) | |
remove_ovirt_runner: | |
runs-on: ubuntu-latest | |
if: ${{ success() || failure() || cancelled() }} | |
needs: [create_ovirt_runner,ci_setup] | |
steps: | |
- name: prepare the secrets | |
uses: kubev2v/forkliftci/ci/prepare-ansible-secrets@v6.0 | |
with: | |
OKD_ENGINE_SECRETS: ${{ secrets.OKD_ENGINE_SECRETS }} | |
OKD_SSH_KEY: ${{ secrets.OKD_SSH_KEY }} | |
- name: provision self hosted runner | |
uses: kubev2v/forkliftci/ci/create-self-runner@v6.0 | |
with: | |
perform_cleanup: true |