Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev kmr #132

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/actions/get-userenvs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ inputs:
rickshaw-directory:
description: "Where is the rickshaw repository to query for userenvs"
required: true
userenv-filter:
description: "A filter to determine which userenvs should be included"
required: false
default: "all"
outputs:
userenvs:
description: "The list of userenvs that were found"
Expand All @@ -13,8 +17,8 @@ runs:
steps:
- name: "Validate rickshaw-directory"
shell: bash
run: ${{ github.action_path }}/validate-inputs.sh ${{ inputs.rickshaw-directory }}
run: ${{ github.action_path }}/validate-inputs.sh ${{ inputs.rickshaw-directory }} ${{ inputs.userenv-filter }}
- name: "Generate userenvs list"
id: generate-userenvs-list
shell: bash
run: ${{ github.action_path }}/generate-userenv-list.sh ${{ inputs.rickshaw-directory }}
run: ${{ github.action_path }}/generate-userenv-list.sh ${{ inputs.rickshaw-directory }} ${{ inputs.userenv-filter }}
22 changes: 18 additions & 4 deletions .github/actions/get-userenvs/generate-userenv-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=bash

rickshaw_directory=${1}
userenv_filter=${2}

excludes="stream8-flexran rhel-ai"

if pushd ${rickshaw_directory}; then
Expand All @@ -12,10 +14,22 @@ if pushd ${rickshaw_directory}; then
new=( "${userenvs[@]/$ex}" )
userenvs=$new
done
userenvs_json="[\"default\","
for userenv in ${userenvs}; do
userenvs_json+="\"${userenv}\","
done
userenvs_json="["

case "${userenv_filter}" in
"all"|"minimal")
userenvs_json+="\"default\","
;;
esac

case "${userenv_filter}" in
"all"|"unique")
for userenv in ${userenvs}; do
userenvs_json+="\"${userenv}\","
done
;;
esac

userenvs_json=$(echo "${userenvs_json}" | sed -e "s/,$//")
userenvs_json+="]"
echo "userenvs_json=${userenvs_json}"
Expand Down
14 changes: 13 additions & 1 deletion .github/actions/get-userenvs/validate-inputs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,27 @@
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=bash

rickshaw_directory=${1}
userenv_filter=${2}

if ! pushd ${rickshaw_directory}; then
exit 1
fi

if [ -f rickshaw-run -a -d userenvs ]; then
ls -l userenvs/*.json
exit 0
else
ls -l
exit 1
fi

case "${userenv_filter}" in
"all"|"minimal"|"unique")
echo "valid userenv-filter: ${userenv_filter}"
;;
*)
echo "invalid userenv-filter: ${userenv_filter}"
exit 1
;;
esac

exit 0
5 changes: 5 additions & 0 deletions .github/workflows/core-crucible-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
github_workspace:
required: true
type: string
userenv_filter:
required: false
type: string
default: "all"
secrets:
registry_auth:
required: false
Expand Down Expand Up @@ -127,6 +131,7 @@ jobs:
uses: ./crucible-ci/.github/actions/get-userenvs
with:
rickshaw-directory: "./rickshaw"
userenv-filter: ${{ inputs.userenv_filter }}
- name: run get-scenarios-github
id: get-scenarios-github
uses: ./crucible-ci/.github/actions/get-scenarios
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/faux-crucible-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ jobs:
runs-on: [ self-hosted, workflow-overhead ]
steps:
- run: 'echo "No build required" '

call-core-crucible-ci:
uses: ./.github/workflows/faux-core-crucible-ci.yaml
25 changes: 0 additions & 25 deletions .github/workflows/run-core-crucible-ci.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/test-core-crucible-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ jobs:
fail-fast: false
matrix:
repos:
- subproject: "CommonDataModel"
subproject_dir: "CommonDataModel"
branch: "master"
userenv_filter: "minimal"
- subproject: "rickshaw"
subproject_dir: "rickshaw"
branch: "master"
userenv_filter: "all"
- subproject: "crucible"
subproject_dir: "crucible"
branch: "master"
userenv_filter: "unique"
uses: ./.github/workflows/core-crucible-ci.yaml
with:
ci_target: "${{ matrix.repos.subproject }}"
Expand All @@ -33,6 +39,7 @@ jobs:
crucible_ci_test: "yes"
crucible_ci_test_branch: "${{ github.ref }}"
github_workspace: "$GITHUB_WORKSPACE"
userenv_filter: ${{ matrix.repos.userenv_filter }}
secrets:
ci_registry_auth: ${{ secrets.CRUCIBLE_CI_ENGINES_REGISTRY_AUTH }}
quay_oauth_token: ${{ secrets.CRUCIBLE_QUAYIO_OAUTH_TOKEN }}
Expand Down
Loading