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

feat(zuul-deprecation): Add workflows #460

Merged
merged 1 commit into from
Jun 18, 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
65 changes: 65 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: check
on: pull_request
jobs:
prepare-env:
runs-on:
group: infra1-runners-arc
labels: runners-small
outputs:
branch: ${{ github.base_ref }}
ref: ${{ github.ref }}
commit: ${{ github.event.pull_request.head.sha }}
pr_number: ${{ github.event.pull_request.number }}
project: ${{ github.repository }}
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
gooddata-js-unit-tests-zuul-docker:
runs-on:
group: infra1-runners-arc
labels: runners-small
needs:
- prepare-env
permissions:
contents: read
id-token: write
steps:
- name: Call Jenkins trigger
id: call-jenkins
uses: gooddata/github-actions-public/jenkins/trigger@master
with:
server: ${{ secrets.JENKINS_ADDRESS }}
folder: client-libs
job-name: gooddata-js-unit-tests-zuul-docker
vault-url: ${{ secrets.VAULT_ADDRESS }}
params: |-
{
"GH_BRANCH": "${{ needs.prepare-env.outputs.branch }}",
"GH_REF": "${{ needs.prepare-env.outputs.ref }}",
"GH_COMMIT": "${{ needs.prepare-env.outputs.commit }}",
"GH_URL": "[email protected]:",
"GH_CHANGE": "${{ needs.prepare-env.outputs.pr_number }}",
"GH_PROJECT": "${{ needs.prepare-env.outputs.project }}",
"BUILD_BY_GITHUB": "true",
"GH_PIPELINE": "check"
}
comment-pr: "true"
ready-to-merge:
runs-on:
group: infra1-runners-arc
labels: runners-small
if: always()
needs:
- prepare-env
- gooddata-js-unit-tests-zuul-docker
steps:
- name: Check if needed jobs succeeded
uses: re-actors/alls-green@release/v1
with:
allowed-skips: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }}
80 changes: 80 additions & 0 deletions .github/workflows/gate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: gate
on:
merge_group:
types:
- checks_requested
jobs:
prepare-env:
runs-on:
group: infra1-runners-arc
labels: runners-small
outputs:
branch: ${{ steps.branch.outputs.branch }}
ref: ${{ github.event.merge_group.head_ref }}
commit: ${{ github.event.merge_group.head_sha }}
pr_number: ${{ steps.pr-number.outputs.pr_number }}
project: ${{ github.repository }}
changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
- name: Branch name
id: branch
run: |-
branch=$(echo "${{ github.event.merge_group.base_ref }}" | sed 's/^refs\/heads\///')
echo "branch=$branch" >> "$GITHUB_OUTPUT"

- name: PR number
id: pr-number
run: |-
pr_num=$(echo "${{ github.ref }}" | sed -n 's/.*pr-\([0-9]*\).*/\1/p')
echo "pr_number=$pr_num" >> "$GITHUB_OUTPUT"

gooddata-js-unit-tests-zuul-docker:
runs-on:
group: infra1-runners-arc
labels: runners-small
needs:
- prepare-env
permissions:
contents: read
id-token: write
steps:
- name: Call Jenkins trigger
id: call-jenkins
uses: gooddata/github-actions-public/jenkins/trigger@master
with:
server: ${{ secrets.JENKINS_ADDRESS }}
folder: client-libs
job-name: gooddata-js-unit-tests-zuul-docker
vault-url: ${{ secrets.VAULT_ADDRESS }}
params: |-
{
"GH_BRANCH": "${{ needs.prepare-env.outputs.branch }}",
"GH_REF": "${{ needs.prepare-env.outputs.ref }}",
"GH_COMMIT": "${{ needs.prepare-env.outputs.commit }}",
"GH_URL": "[email protected]:",
"GH_CHANGE": "${{ needs.prepare-env.outputs.pr_number }}",
"GH_PROJECT": "${{ needs.prepare-env.outputs.project }}",
"BUILD_BY_GITHUB": "true",
"GH_PIPELINE": "gate"
}
comment-pr: "true"
ready-to-merge:
runs-on:
group: infra1-runners-arc
labels: runners-small
if: always()
needs:
- prepare-env
- gooddata-js-unit-tests-zuul-docker
steps:
- name: Check if needed jobs succeeded
uses: re-actors/alls-green@release/v1
with:
allowed-skips: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }}