4 # yamllint disable-line rule:truthy
9 description: "Branch that change is against"
13 description: "The ID for the change"
17 description: "The Gerrit number"
21 description: "URL to the change"
25 description: "Type of Gerrit event"
28 GERRIT_PATCHSET_NUMBER:
29 description: "The patch number for the change"
32 GERRIT_PATCHSET_REVISION:
33 description: "The revision sha"
37 description: "Project in Gerrit"
41 description: "Gerrit refspec of change"
46 group: ${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }}
47 cancel-in-progress: true
51 runs-on: ubuntu-latest
54 uses: lfit/gerrit-review-action@v0.3
56 host: ${{ vars.GERRIT_SERVER }}
57 username: ${{ vars.GERRIT_SSH_USER }}
58 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
59 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
60 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
61 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
63 - name: Allow replication
66 # run pre-commit tox env separately to get use of more parallel processing
69 runs-on: ubuntu-latest
71 - uses: lfit/checkout-gerrit-change-action@v0.2
73 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
75 - uses: actions/setup-python@v4
77 python-version: "3.11"
78 - name: Run static analysis and format checkers
79 run: pipx run tox -e pre-commit
83 runs-on: ubuntu-latest
85 - uses: lfit/checkout-gerrit-change-action@v0.2
87 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
89 - uses: actions/setup-python@v4
92 python-version: "3.11"
93 - name: Clone git submodules
94 run: git submodule update --init
95 - name: Run JJB Verify
97 python -m pip install --upgrade pip
98 pip install jenkins-job-builder
99 mkdir -p "${HOME}/.config/jenkins_jobs"
100 cat << EOF > "${HOME}/.config/jenkins_jobs/jenkins_jobs.ini"
103 keep_descriptions=False
106 query_plugins_info=False
109 jenkins-jobs test -o archives/job-configs jjb/
113 needs: [prepare, pre-commit, jjb-validation]
114 runs-on: ubuntu-latest
116 - uses: technote-space/workflow-conclusion-action@v3
118 uses: lfit/gerrit-review-action@v0.3
120 host: ${{ vars.GERRIT_SERVER }}
121 username: ${{ vars.GERRIT_SSH_USER }}
122 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
123 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
124 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
125 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
126 vote-type: ${{ env.WORKFLOW_CONCLUSION }}