diff --git a/.github/workflows/airflow-operator.yml b/.github/workflows/airflow-operator.yml index b40c7eacb66..4868ed39b58 100644 --- a/.github/workflows/airflow-operator.yml +++ b/.github/workflows/airflow-operator.yml @@ -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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9601a630388..81d0302c8ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: @@ -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 diff --git a/.github/workflows/check-required.yml b/.github/workflows/check-required.yml index 33f1e28063e..e5bbb3d2a88 100644 --- a/.github/workflows/check-required.yml +++ b/.github/workflows/check-required.yml @@ -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 @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5dd2bc1c07..22103ada621 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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. diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c2cdf9fd172..bbd38eedc2b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,8 +14,6 @@ name: "CodeQL" on: schedule: - cron: "0 9 * * *" - push: - branches: [oss-586-resolve-deprecation-and-warnings] permissions: actions: read diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a0eb1ccb748..274464a2260 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/python-client.yml b/.github/workflows/python-client.yml index f94a369e550..8541394a811 100644 --- a/.github/workflows/python-client.yml +++ b/.github/workflows/python-client.yml @@ -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 diff --git a/.github/workflows/release-rc.yml b/.github/workflows/release-rc.yml index a33c6ebd2e8..e3812818548 100644 --- a/.github/workflows/release-rc.yml +++ b/.github/workflows/release-rc.yml @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d60d2950d9..87fae9f257a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/slack-alerts.yml b/.github/workflows/slack-alerts.yml index 1f7232aad84..15be0b7cb25 100644 --- a/.github/workflows/slack-alerts.yml +++ b/.github/workflows/slack-alerts.yml @@ -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"