handle parsing of can and vcan port names for systec #105
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: Gitlab Pipeline Integration | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| Gitlab_Trigger_Pipeline: | |
| name: Setting up Pipeline | |
| runs-on: cern:gitlab-ci | |
| container: ghcr.io/miguensone/github-gitlab-sync:latest | |
| env: | |
| GITLAB_URL: ${{ vars.GITLAB_URL }} | |
| PROJECT_ID: ${{ vars.PROJECT_ID }} | |
| GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
| COMMIT_REF: ${{ github.sha }} | |
| outputs: | |
| job_matrix: ${{ steps.set-matrix.outputs.job_matrix }} | |
| pipeline_id: ${{ steps.set-matrix.outputs.pipeline_id }} | |
| steps: | |
| - name: Trigger Gitlab Pipeline | |
| id: set-matrix | |
| run: | | |
| python /opt/bridge/sync-repository.py | |
| python /opt/bridge/create-temp-branch.py | |
| export PIPELINE_ID=$(python /opt/bridge/trigger-pipeline.py) | |
| export LIST_JOBS=$(python /opt/bridge/retrieve-jobs.py) | |
| echo "pipeline_id=${PIPELINE_ID}" >> $GITHUB_OUTPUT | |
| echo "job_matrix<<EOF" >> $GITHUB_OUTPUT | |
| echo "${LIST_JOBS}" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| echo Pipeline number: $PIPELINE_ID | |
| echo Jobs detected: $LIST_JOBS | |
| Job: | |
| needs: Gitlab_Trigger_Pipeline | |
| name: ${{ matrix.job.name }} [${{ matrix.job.key }}] | |
| runs-on: cern:gitlab-ci | |
| container: ghcr.io/miguensone/github-gitlab-sync:latest | |
| env: | |
| GITLAB_URL: ${{ vars.GITLAB_URL }} | |
| PROJECT_ID: ${{ vars.PROJECT_ID }} | |
| GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
| strategy: | |
| matrix: | |
| job: ${{ fromJson(needs.Gitlab_Trigger_Pipeline.outputs.job_matrix) }} | |
| fail-fast: false | |
| steps: | |
| - name: Retrieve Gitlab Job Log [${{ matrix.job.key }}] | |
| env: | |
| JOB_ID: ${{ matrix.job.JOB_ID }} | |
| run: | | |
| python /opt/bridge/retrieve-job.py | |
| Gitlab_Pipeline_Final_Status: | |
| needs: [Job, Gitlab_Trigger_Pipeline] | |
| name: Final Pipeline Status | |
| if: always() | |
| runs-on: cern:gitlab-ci | |
| container: ghcr.io/miguensone/github-gitlab-sync:latest | |
| env: | |
| GITLAB_URL: ${{ vars.GITLAB_URL }} | |
| PROJECT_ID: ${{ vars.PROJECT_ID }} | |
| GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
| PIPELINE_ID: ${{ needs.Gitlab_Trigger_Pipeline.outputs.pipeline_id }} | |
| COMMIT_REF: ${{ github.sha }} | |
| steps: | |
| - name: Final Gitlab Pipeline Status | |
| run: | | |
| python /opt/bridge/wait-end-pipeline.py | |
| python /opt/bridge/delete-temp-branch.py | |
| python /opt/bridge/status-end-pipeline.py |