Skip to content

Commit

Permalink
SRE-2171 ci: Big refactor of GHA workflows (#15556)
Browse files Browse the repository at this point in the history
Add the use of reusable workflows and actions to reduce the amount of
duplicated code in this repository as well as dependency repositories.

Fixes: SRE-2570

Signed-off-by: Brian J. Murrell <[email protected]>
  • Loading branch information
brianjmurrell authored Dec 9, 2024
1 parent ab5815d commit 84a4f34
Show file tree
Hide file tree
Showing 11 changed files with 940 additions and 472 deletions.
14 changes: 0 additions & 14 deletions .github/actions/import-commit-pragmas/action.yml

This file was deleted.

22 changes: 19 additions & 3 deletions .github/actions/provision-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,48 @@ runs:
STAGE_NAME='${{ env.STAGE_NAME }}'
REQID='${{ github.event.pull_request.number }}-${{ github.run_number }}'
CP_PRIORITY=${{ env.CP_PRIORITY }}
echo "::group::Provisioning"
if ! JENKINS_URL='${{ env.JENKINS_URL }}' \
LABEL='${{ env.LABEL }}' \
PRIORITY=${CP_PRIORITY:-3} \
COVFN_DISABLED=${COVFN_DISABLED} \
provision_cluster "$STAGE_NAME" "${{ github.run_id }}" \
"${{ runner.name }}" \
"$REQID-${STAGE_NAME// /_}"; then
echo "::endgroup::"
echo "Failed to provision cluster"
exit 1
fi
echo "::endgroup::"
- name: Wait for nodes to be ready
if: ${{ inputs.condition }}
shell: bash
run: . ci/gha_functions.sh;
set -eux;
wait_nodes_ready
echo "::group::Waiting for nodes to be ready";
wait_nodes_ready;
echo "::endgroup::"
- name: Post-provision cluster
if: ${{ inputs.condition }}
shell: bash
run: |
. ci/gha_functions.sh
set -x
inst_repos="${{ env.CP_PR_REPOS }} ${{ github.event.inputs.pr-repos }}"
if [ -z "${{ env.CP_RPM_TEST_VERSION }}" ] &&
if [ -n "${{ github.event.inputs.rpm-test-version }}" ]; then
rpm_test_version="${{ github.event.inputs.rpm-test-version }}"
elif [ -n "${{ env.CP_RPM_TEST_VERSION }}" ]; then
rpm_test_version="${{ env.CP_RPM_TEST_VERSION }}"
fi
if [ -z "$rpm_test_version" ] &&
[[ $inst_repos != *daos@* ]]; then
inst_repos+=" daos@PR-${{ github.event.pull_request.number }}"
inst_repos+=":${{ github.run_number }}"
fi
ARTIFACTS_URL=$ARTIFACTS_URL \
echo "::group::Post-provision configuration";
ARTIFACTS_URL="$ARTIFACTS_URL" \
INST_REPOS="$(eval echo "$inst_repos")" \
CI_RPM_TEST_VERSION="$rpm_test_version" \
DAOS_VERSION="$DAOS_VERSION" \
DISTRO=$PROVISION_DISTRO ci/provisioning/post_provision_config.sh
echo "::endgroup::"
28 changes: 0 additions & 28 deletions .github/actions/variable-from-pragma/action.yml

This file was deleted.

Loading

0 comments on commit 84a4f34

Please sign in to comment.