Skip to content

Commit

Permalink
Merge branch 'master' into feature/cat_recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
kjacque committed Nov 16, 2023
2 parents 4eca0ee + d89bb20 commit 467b191
Show file tree
Hide file tree
Showing 33 changed files with 1,868 additions and 211 deletions.
14 changes: 14 additions & 0 deletions .github/actions/import-commit-pragmas/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Import Commit Pragmas'
description: 'Import Commit Pragmas'
runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: . ci/gha_functions.sh;
git show -s --format=%B | sed -e "s/'/'\"'\"'/g" |
get_commit_pragmas |
sed -e 's/^/CP_/' >> $GITHUB_ENV
shell: bash
49 changes: 49 additions & 0 deletions .github/actions/provision-cluster/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Provision Cluster'
description: 'Provision Cluster'
inputs:
condition:
description: Condition this should run on
required: true
runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Request and Provision a Cluster
if: ${{ inputs.condition }}
shell: bash
run: |
. ci/gha_functions.sh
STAGE_NAME='${{ env.STAGE_NAME }}'
REQID='${{ github.event.pull_request.number }}-${{ github.run_number }}'
CP_PRIORITY=${{ env.CP_PRIORITY }}
if ! JENKINS_URL='${{ env.JENKINS_URL }}' \
LABEL='${{ env.LABEL }}' \
PRIORITY=${CP_PRIORITY:-3} \
provision_cluster "$STAGE_NAME" "${{ github.run_id }}" \
"${{ runner.name }}" \
"$REQID-${STAGE_NAME// /_}"; then
echo "Failed to provision cluster"
exit 1
fi
- name: Wait for nodes to be ready
if: ${{ inputs.condition }}
shell: bash
run: . ci/gha_functions.sh;
set -eux;
wait_nodes_ready
- name: Post-provision cluster
if: ${{ inputs.condition }}
shell: bash
run: |
. ci/gha_functions.sh
inst_repos="${{ env.CP_PR_REPOS }} ${{ github.event.inputs.pr-repos }}"
if [[ $inst_repos != *daos@* ]]; then
inst_repos+=" daos@PR-${{ github.event.pull_request.number }}"
inst_repos+=":${{ github.run_number }}"
fi
ARTIFACTS_URL=$ARTIFACTS_URL \
INST_REPOS="$(eval echo "$inst_repos")" \
DISTRO=$PROVISION_DISTRO ci/provisioning/post_provision_config.sh
28 changes: 28 additions & 0 deletions .github/actions/variable-from-pragma/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Set Variable from Commit Pragma'
description: 'Set Variable from Commit Pragma'
inputs:
commit_message:
description: Dequoted commit message
required: true
pragma:
description: Pragma to make a variable from
required: true
default:
description: Default value if pragma is not found
required: false
outputs:
value:
description: The value of the pragma
value: ${{ steps.value.outputs.value }}

runs:
using: "composite"
steps:
- name: Create Variable
id: value
shell: bash
run: |
. ci/gha_functions.sh
set -eu
eval $(echo '${{ inputs.commit_message }}' | get_commit_pragmas)
echo "value=${${{ inputs.pragma }}:-${{ inputs.default }}}" >> $GITHUB_OUTPUT
120 changes: 120 additions & 0 deletions .github/workflows/rpm-build-and-test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: 'RPM Build and Test Report'

on:
workflow_run:
workflows: ['RPM Build and Test']
types:
- completed
# for testing before landing
workflow_dispatch:

permissions:
contents: read
actions: read
checks: write

jobs:
report-vm-1:
runs-on: [self-hosted, docker]
strategy:
matrix:
# TODO: figure out how to determine this matrix
distro: ['el8', 'el9', 'leap15']
env:
STAGE_NAME:
steps:
- name: Set variables
run: |
case ${{ matrix.distro }} in
'el8')
DISTRO_NAME="EL"
DISTRO_VERSION="8"
;;
'el9')
DISTRO_NAME="EL"
DISTRO_VERSION="9"
;;
'leap15')
DISTRO_NAME="Leap"
DISTRO_VERSION="15.4"
;;
esac
echo "STAGE_NAME=Build RPM on $DISTRO_NAME $DISTRO_VERSION" >> $GITHUB_ENV
- name: Test Report
uses: phoenix-actions/test-reporting@v10
with:
artifact: ${{ env.STAGE_NAME }} test-results
name: ${{ env.STAGE_NAME }} Test Results (phoenix-actions)
path: ${{ env.STAGE_NAME }}/**/results.xml
reporter: java-junit # Format of test results

report-hw-1:
runs-on: [self-hosted, docker]
strategy:
matrix:
# TODO: figure out how to determine this matrix
stage: ['Large', 'Medium', 'Medium UCX Provider']
env:
STAGE_NAME:
steps:
- name: Set variables
run: echo "STAGE_NAME=Functional Hardware ${{ matrix.stage }}" >> $GITHUB_ENV
- name: Test Report
uses: phoenix-actions/test-reporting@v10
with:
artifact: ${{ env.STAGE_NAME }} test-results
name: ${{ env.STAGE_NAME }} Test Results (phoenix-actions)
path: ${{ env.STAGE_NAME }}/**/results.xml
reporter: java-junit # Format of test results

report2:
runs-on: [self-hosted, docker]
strategy:
matrix:
distro: ['el8', 'el9', 'leap15']
env:
STAGE_NAME:
steps:
- name: Set variables
run: |
case ${{ matrix.distro }} in
'el8')
DISTRO_NAME="EL"
DISTRO_VERSION="8"
;;
'el9')
DISTRO_NAME="EL"
DISTRO_VERSION="9"
;;
'leap15')
DISTRO_NAME="Leap"
DISTRO_VERSION="15.4"
;;
esac
echo "STAGE_NAME=Build RPM on $DISTRO_NAME $DISTRO_VERSION" >> $GITHUB_ENV
- name: Test Report
uses: dorny/test-reporter@v1
with:
artifact: ${{ env.STAGE_NAME }} test-results
name: ${{ env.STAGE_NAME }} Test Results (dorny)
path: ${{ env.STAGE_NAME }}/**/results.xml
reporter: jest-junit # Format of test results

report-hw-2:
runs-on: [self-hosted, docker]
strategy:
matrix:
# TODO: figure out how to determine this matrix
stage: ['Large', 'Medium', 'Medium UCX Provider']
env:
STAGE_NAME:
steps:
- name: Set variables
run: echo "STAGE_NAME=Functional Hardware ${{ matrix.stage }}" >> $GITHUB_ENV
- name: Test Report
uses: dorny/test-reporter@v1
with:
artifact: ${{ env.STAGE_NAME }} test-results
name: ${{ env.STAGE_NAME }} Test Results (dorny)
path: ${{ env.STAGE_NAME }}/**/results.xml
reporter: java-junit # Format of test results
Loading

0 comments on commit 467b191

Please sign in to comment.