Skip to content

Commit

Permalink
remove conditions in jobs for testing
Browse files Browse the repository at this point in the history
Signed-off-by: Ljubo Nikolic <[email protected]>

Signed-off-by: Ljubo Nikolić <[email protected]>
  • Loading branch information
ljubon committed Mar 22, 2024
1 parent eb5600e commit e4bed52
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/airflow-operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
path: third_party/airflow
github-token: ${{secrets.GITHUB_TOKEN}}
airflow-integration-tests:
if: github.repository_owner == 'armadaproject'
# if: github.repository_owner == 'armadaproject'
# As of December 2022, using 8vcpu runners is slower overall,
# due to longer queue times.
runs-on: ubuntu-22.04
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:

jobs:
prepare:
runs-on: ubuntu-latest-16-cores
if: github.repository_owner == 'armadaproject'
runs-on: ubuntu-latest
# if: github.repository_owner == 'armadaproject'
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -32,16 +32,16 @@ jobs:
DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}"

- name: Output full commit sha
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: echo "sha_full=$(git rev-parse HEAD)" >> $GITHUB_ENV

- name: Save Docker image tarballs
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
scripts/docker-save.sh -t ${{ env.sha_full }} -o /tmp/imgs
- name: Save Docker image tarballs as artifacts
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: armada-image-tarballs
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/check-required.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ name: Check required jobs
# for more details.

on:
workflow_run:
workflows: [CI]
push:
branches: [oss-586-resolve-deprecation-and-warnings]

permissions:
actions: read
Expand All @@ -21,7 +21,7 @@ permissions:
jobs:
required-jobs:
name: Check required jobs
if: ${{ !github.event.repository.fork }}
# if: ${{ !github.event.repository.fork }}
environment: create-check
runs-on: ubuntu-latest
steps:
Expand All @@ -32,6 +32,12 @@ jobs:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- uses: actions/github-script@v7
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
core.info(`Dummy value`)
- uses: actions/github-script@v7
with:
github-token: ${{ steps.app-token.outputs.token }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ permissions:

jobs:
lint:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
# if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/lint.yml
test:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
# if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/test.yml
build:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
# if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/build.yml

# Virtual job that can be configured as a required check before a PR can be merged.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ name: "CodeQL"
on:
schedule:
- cron: "0 9 * * *"
push:
branches: [oss-586-resolve-deprecation-and-warnings]

permissions:
actions: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}

python-client-integration-tests:
if: github.repository_owner == 'armadaproject'
# if: github.repository_owner == 'armadaproject'
# As of December 2022, using 8vcpu runners is slower overall,
# due to longer queue times.
runs-on: ubuntu-22.04
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/release-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ on:
workflows: [CI]
branches:
- master
- oss-586-resolve-deprecation-and-warnings
push:
branches: [oss-586-resolve-deprecation-and-warnings]

permissions:
contents: write

jobs:
validate:
if: github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'armadaproject'
# if: github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'armadaproject'
name: "Validate revision"
runs-on: ubuntu-22.04

Expand All @@ -25,18 +28,18 @@ jobs:
# The given ref should belong to the master branch.
# If it's master, it shouldn't be more than 2 commits away (in case another push happened in the meantime).
# Anything else is invalid.
- name: Validate ref
run: |
ref='${{ github.event.workflow_run.head_branch }}'
sha='${{ github.event.workflow_run.head_sha }}'
# - name: Validate ref
# run: |
# ref='${{ github.event.workflow_run.head_branch }}'
# sha='${{ github.event.workflow_run.head_sha }}'

[ "$ref" == "master" ] &&
[ $(git branch --contains=$sha master | wc -l) -eq 1 ] &&
[ $(git rev-list --count $sha..master) -le 2 ]
if [ $? -ne 0 ]; then
echo "::error ::Invalid ref $ref $sha: must be a merge to master branch and not more than 2 commits away"
exit 1
fi
# [ "$ref" == "master" ] &&
# [ $(git branch --contains=$sha master | wc -l) -eq 1 ] &&
# [ $(git rev-list --count $sha..master) -le 2 ]
# if [ $? -ne 0 ]; then
# echo "::error ::Invalid ref $ref $sha: must be a merge to master branch and not more than 2 commits away"
# exit 1
# fi
release:
name: Release
needs: validate
Expand Down
43 changes: 23 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ on:
workflows: [CI]
branches:
- v*
- oss-586-resolve-deprecation-and-warnings
push:
branches: [oss-586-resolve-deprecation-and-warnings]

permissions:
contents: write

jobs:
validate:
if: github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'armadaproject'
# if: github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'armadaproject'
name: "Validate revision"
runs-on: ubuntu-22.04

Expand All @@ -25,18 +28,18 @@ jobs:
# The given ref should belong to the master branch.
# If it starts with 'v', it should be a tag, belong to the master branch and match the semver regex.
# Anything else is invalid.
- name: Validate ref
run: |
ref='${{ github.event.workflow_run.head_branch }}'
sha='${{ github.event.workflow_run.head_sha }}'
[[ $ref =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] &&
[ $(git tag --points-at $sha | grep -E "^$ref\$" | wc -l) -eq 1 ] &&
[ $(git branch --contains=$sha master | wc -l) -eq 1 ]
if [ $? -ne 0 ]; then
echo "::error ::Invalid ref $ref $sha: must be a tag, belong to the master branch and match the semver regex"
exit 1
fi
# - name: Validate ref
# run: |
# ref='${{ github.event.workflow_run.head_branch }}'
# sha='${{ github.event.workflow_run.head_sha }}'

# [[ $ref =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] &&
# [ $(git tag --points-at $sha | grep -E "^$ref\$" | wc -l) -eq 1 ] &&
# [ $(git branch --contains=$sha master | wc -l) -eq 1 ]
# if [ $? -ne 0 ]; then
# echo "::error ::Invalid ref $ref $sha: must be a tag, belong to the master branch and match the semver regex"
# exit 1
# fi
release:
name: "Release"
needs: validate
Expand Down Expand Up @@ -90,13 +93,13 @@ jobs:
DOCKER_REPO: "gresearch"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}"
invoke-chart-push:
name: Invoke Chart push
needs: release
uses: G-Research/charts/.github/workflows/invoke-push.yaml@master
secrets:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
# invoke-chart-push:
# name: Invoke Chart push
# needs: release
# uses: G-Research/charts/.github/workflows/invoke-push.yaml@master
# secrets:
# APP_ID: ${{ secrets.APP_ID }}
# APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}

push-nuget:
name: Push nuget clients
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/slack-alerts.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: Slack CI Alerts

on:
workflow_run:
workflows: [CI, Python Airflow Operator, Build Release Images, Release Armada components, Release Armada components - RC]
types: [completed]
push:
branches: [oss-586-resolve-deprecation-and-warnings]

jobs:
on-failure:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'failure'
# if: github.event.workflow_run.conclusion == 'failure'
steps:
- uses: actions/checkout@v4
- name: "Send Notification"
Expand Down

0 comments on commit e4bed52

Please sign in to comment.