diff --git a/.github/actions/get-userenvs/action.yml b/.github/actions/get-userenvs/action.yml index f6652bd..7a49b4c 100644 --- a/.github/actions/get-userenvs/action.yml +++ b/.github/actions/get-userenvs/action.yml @@ -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" @@ -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 }} diff --git a/.github/actions/get-userenvs/generate-userenv-list.sh b/.github/actions/get-userenvs/generate-userenv-list.sh index b0e9ad2..f614549 100755 --- a/.github/actions/get-userenvs/generate-userenv-list.sh +++ b/.github/actions/get-userenvs/generate-userenv-list.sh @@ -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 @@ -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}" diff --git a/.github/actions/get-userenvs/validate-inputs.sh b/.github/actions/get-userenvs/validate-inputs.sh index d09d9f0..003f45d 100755 --- a/.github/actions/get-userenvs/validate-inputs.sh +++ b/.github/actions/get-userenvs/validate-inputs.sh @@ -3,6 +3,7 @@ # vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=bash rickshaw_directory=${1} +userenv_filter=${2} if ! pushd ${rickshaw_directory}; then exit 1 @@ -10,8 +11,19 @@ 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 diff --git a/.github/workflows/core-crucible-ci.yaml b/.github/workflows/core-crucible-ci.yaml index 5438d62..24135f7 100644 --- a/.github/workflows/core-crucible-ci.yaml +++ b/.github/workflows/core-crucible-ci.yaml @@ -23,6 +23,10 @@ on: github_workspace: required: true type: string + userenv_filter: + required: false + type: string + default: "all" secrets: registry_auth: required: false @@ -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 diff --git a/.github/workflows/test-core-crucible-ci.yaml b/.github/workflows/test-core-crucible-ci.yaml index 37e4cba..f84fb43 100644 --- a/.github/workflows/test-core-crucible-ci.yaml +++ b/.github/workflows/test-core-crucible-ci.yaml @@ -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 }}" @@ -33,6 +39,7 @@ jobs: crucible_ci_test: "yes" crucible_ci_test_branch: "${{ github.ref }}" github_workspace: "$GITHUB_WORKSPACE" + userenv_filter: ${{ matrix.userenv_filter }} secrets: ci_registry_auth: ${{ secrets.CRUCIBLE_CI_ENGINES_REGISTRY_AUTH }} quay_oauth_token: ${{ secrets.CRUCIBLE_QUAYIO_OAUTH_TOKEN }}