Skip to content

Commit

Permalink
revert - 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 e4bed52 commit ababa7b
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 65 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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
prepare:
runs-on: ubuntu-latest
# if: github.repository_owner == 'armadaproject'
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
6 changes: 3 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:
push:
branches: [oss-586-resolve-deprecation-and-warnings]
workflow_run:
workflows: [CI]

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 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: 0 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ name: "CodeQL"
on:
schedule:
- cron: "0 9 * * *"
push:
branches: [oss-586-resolve-deprecation-and-warnings]

permissions:
actions: read
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ jobs:
- name: Generating TypeScript lint results as summary
working-directory: ./internal/lookout/ui
run: |
yarn run lint &> lint_results.txt || true
lint_results=$(cat lint_results.txt)
echo -e "## 🪧 Typescript Lint Results\n" >> $GITHUB_STEP_SUMMARY
if [[ $lint_results =~ "problem" ]]; then
echo -e "### List of Lint Issues \n" >> $GITHUB_STEP_SUMMARY
echo -e "${lint_results}" >> $GITHUB_STEP_SUMMARY
echo -e "${lint_results}"
exit 1
else
yarn run lint &> lint_results.txt || true
lint_results=$(cat lint_results.txt)
echo -e "## 🪧 Typescript Lint Results\n" >> $GITHUB_STEP_SUMMARY
if [[ $lint_results =~ "problem" ]]; then
echo -e "### List of Lint Issues \n" >> $GITHUB_STEP_SUMMARY
echo -e "${lint_results}" >> $GITHUB_STEP_SUMMARY
echo -e "${lint_results}"
exit 1
else
echo -e "### No Lint issues found.\n" >> $GITHUB_STEP_SUMMARY
echo -e "No Lint issues found."
exit 0
fi
fi
go-lint:
name: Lint Go
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: 12 additions & 15 deletions .github/workflows/release-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ 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 @@ -28,18 +25,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: 20 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ 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 @@ -28,18 +25,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 @@ -93,13 +90,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: 4 additions & 3 deletions .github/workflows/slack-alerts.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Slack CI Alerts

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

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 ababa7b

Please sign in to comment.