Create test-loop.yml #18
This file contains hidden or 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: Sync Ansible Project | |
| on: | |
| push: | |
| branches: [development] | |
| # jobs: | |
| # my-job: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: my-step | |
| # run: echo "Hello World!" | |
| # Add a note | |
| # env: | |
| # NUMBERS: '1, 2, 3, 4, 5, 6, 7, 8, 9, 10' | |
| # PROJECT_DEV_IDs: '562, 586, 591, 645, 681, 683, 723, 728, 732, 907' | |
| # PROJECT_PROD_IDs: '513, 535, 576, 598, 705, 730, 749, 758' | |
| # PROJECT_DEV_IDs: | |
| # - 562 # RHEL Automation - main | |
| # - 586 # RHEL 8 STIG - dev - development | |
| # - 591 # RHEL 8 Automation - development - development | |
| # - 645 # RHEL Automation - Development Branch - development | |
| # - 681 # X1MP - Development - RHEL Automation - feature/selinux | |
| # - 683 # XHM6 - Development - RHEL Automation - feature/sudo | |
| # - 723 # RHEL 8 STIG-test - feature/rhel8STIG | |
| # - 728 # mf85 dev - feature/retry_pkgrepos | |
| # - 732 # X1MP - Sudo - feature/sudo | |
| # - 907 # RHEL 8 STIG-test Rsmith - feature/rsmithscc | |
| # PROJECT_PROD_IDs: | |
| # - 513 # UPT_TEST_RHEL8_Project - development | |
| # - 535 # Medicare RHEL 8 SCC non-prod - development | |
| # - 576 # Test agent-install role - development | |
| # - 598 # RHEL Automation - main | |
| # - 705 # RHEL Automation - Emergency Prod Build Project - feature/asis-postdeploy | |
| # - 730 # RHEL Compliance Jobs - main | |
| # - 749 # RHEL Automation - Development Branch - development | |
| # - 758 # RHEL Compliance Jobs @ 09:19:32:1932 AM - main | |
| # jobs: | |
| # compute: | |
| # runs-on: ubuntu-latest | |
| # outputs: | |
| # PROJECT_DEV_IDs: ${{ env.PROJECT_DEV_IDs }} | |
| # PROJECT_PROD_IDs: ${{ env.PROJECT_PROD_IDs }} | |
| # steps: | |
| # - name: Compute outputs | |
| # run: | | |
| # echo "PROJECT_DEV_IDs=${{ env.PROJECT_DEV_IDs }}" >> $GITHUB_OUTPUT | |
| # echo "PROJECT_PROD_IDs=${{ env.PROJECT_PROD_IDs }}" >> $GITHUB_OUTPUT | |
| # build_test: | |
| # runs-on: ubuntu-latest | |
| # needs: compute | |
| # strategy: | |
| # matrix: | |
| # devid: ["${{ needs.compute.outputs.PROJECT_DEV_IDs }}"] | |
| # steps: | |
| # - name: Run matrix for ${{ matrix.devid }} | |
| # run: | | |
| # echo "Channel: ${{ matrix.devid }}" | |
| jobs: | |
| job-loop: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # dev_id: ${{ fromJSON(env.PROJECT_DEV_IDs) }} | |
| # items: [item1, item2, item3, item4] # Replace with your list items | |
| PROJECT_DEV_IDs: [562, 586, 591, 645, 681, 683, 723, 728, 732, 907] | |
| # PROJECT_PROD_IDs: [513, 535, 576, 598, 705, 730, 749, 758] | |
| steps: | |
| - name: collect variables | |
| uses: actions/setup-node@v4 | |
| with: | |
| devid: ${{ matrix.PROJECT_DEV_IDs }} | |
| # - name: Print item | |
| # run: | | |
| # echo Item: ${{ matrix.PROJECT_DEV_IDs }} | |
| # echo Item: $ {{ matrix.dev_id }} | |
| # job-print: | |
| # needs: job-loop | |
| # runs-on: ubuntu-latest | |
| # strategy: | |
| # matrix: ${{ fromJSON(needs.job2.outputs.matrix) }} | |
| # steps: | |
| # - run: echo "Matrix - Project ${{ matrix.project }}, Config ${{ matrix.config }}" |