Skip to content

Commit

Permalink
Merge branch 'master' into raaj-patel/create_job_error
Browse files Browse the repository at this point in the history
Signed-off-by: Rich Scott <[email protected]>
  • Loading branch information
richscott committed Oct 24, 2023
2 parents 7c3b909 + d5bbd47 commit b142a9d
Show file tree
Hide file tree
Showing 316 changed files with 5,692 additions and 3,860 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ indent_size = 2
indent_style = space
indent_size = 2

[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
[{go.mod,go.sum,*.go,.gitmodules}]
indent_style = tab
indent_size = 4

Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/autoupdate.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build

on:
workflow_call:

jobs:
prepare:
runs-on: ubuntu-latest-16-cores
if: github.repository_owner == 'armadaproject'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go with Cache
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Cache GOBIN
uses: actions/cache@v3
with:
path: /home/runner/go/bin
key: ${{ runner.os }}-gobin-${{ hashFiles('**/tools.yaml') }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: v1.20.0
args: release --snapshot --skip-sbom --skip-sign --clean
env:
DOCKER_REPO: "gresearch"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}"
DOCKER_BUILDX_CACHE_FROM: "type=gha"
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"

- name: Output full commit sha
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'
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'
uses: actions/upload-artifact@v3
with:
name: armada-image-tarballs
path: /tmp/imgs
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,22 @@ 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
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
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
uses: ./.github/workflows/build.yml
# Virtual job that can be configured as a required check before a PR can be merged.
all-required-checks-done:
name: All required checks done
if: ${{ always() }}
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
needs:
- lint
- test
- build
runs-on: ubuntu-22.04
steps:
- uses: actions/github-script@v6
Expand All @@ -48,3 +54,4 @@ jobs:
} else {
core.setFailed('Some required checks failed');
}
47 changes: 0 additions & 47 deletions .github/workflows/not-airflow-operator.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/not-python-client.yml

This file was deleted.

25 changes: 4 additions & 21 deletions .github/workflows/release-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,33 +49,16 @@ jobs:
with:
fetch-depth: 0

- name: Setup Golang with Cache
uses: magnetikonline/action-golang-cache@v4
with:
go-version: "1.20"

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: "Docker login"
uses: "docker/login-action@v2"
with:
username: "${{ secrets.DOCKERHUB_USER }}"
password: "${{ secrets.DOCKERHUB_PASS }}"

- name: "Run GoReleaser"
uses: "goreleaser/goreleaser-action@v4"
with:
distribution: "goreleaser"
version: v1.19.2
args: "-f ./.goreleaser.yml release --snapshot --skip-sbom --skip-sign --clean"
- name: Download Docker image tarballs artifact
run: gh run download ${{ github.event.workflow_run.id }} --name armada-image-tarballs
env:
DOCKER_REPO: "gresearch"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}"
DOCKER_BUILDX_CACHE_FROM: "type=gha"
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"
GH_TOKEN: ${{ github.token }}

- name: Run Docker push script
run: ./scripts/docker-push.sh -t '${{ github.event.workflow_run.head_sha }}'
run: ./scripts/docker-push.sh --tag '${{ github.event.workflow_run.head_sha }}' --images-dir . --use-tarballs "true"
30 changes: 23 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code Build and Tests
name: Tests

on:
workflow_call:
Expand All @@ -10,7 +10,7 @@ permissions:
jobs:
ts-unit-tests:
name: TypeScript Unit Tests
runs-on: ubuntu-22.04
runs-on: ubuntu-latest-4-cores

steps:
- name: Checkout
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:

go-unit-tests:
name: Golang Unit Tests
runs-on: ubuntu-22.04
runs-on: ubuntu-latest-4-cores

steps:
- name: Checkout
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

go-integration-tests:
name: Golang Integration Tests
runs-on: ubuntu-22.04
runs-on: ubuntu-latest-4-cores

env:
ARMADA_EXECUTOR_INGRESS_URL: "http://localhost"
Expand Down Expand Up @@ -131,6 +131,22 @@ jobs:
path: junit.xml
if-no-files-found: error

- name: Store Docker Logs
if: always()
run: |
mkdir -p ./logs
docker compose logs --no-color > ./logs/docker-compose.log
docker logs pulsar > ./logs/pulsar.log 2>&1
- name: Upload Docker Compose Logs
uses: actions/upload-artifact@v3
if: always()
with:
name: docker-compose-logs
path: |
./logs/
if-no-files-found: error

- name: Publish JUnit Report
uses: mikepenz/action-junit-report@v3
if: always()
Expand All @@ -143,7 +159,7 @@ jobs:

go-mod-up-to-date:
name: Golang Mod Up To Date
runs-on: ubuntu-22.04
runs-on: ubuntu-latest-4-cores

steps:
- name: Checkout code
Expand Down Expand Up @@ -182,7 +198,7 @@ jobs:
proto-up-to-date:
name: Proto Up To Date
runs-on: ubuntu-22.04
runs-on: ubuntu-latest-4-cores

steps:
- name: Checkout
Expand Down Expand Up @@ -214,7 +230,7 @@ jobs:
echo -e "### Git status" >> $GITHUB_STEP_SUMMARY
if [[ "$changed" -gt 0 ]]; then
echo -e "Generated proto files are out of date. Please run 'make proto' and commit the changes." >> $GITHUB_STEP_SUMMARY
echo -e "Generated proto files are out of date. Please run 'mage proto' and commit the changes." >> $GITHUB_STEP_SUMMARY
git status -s -uno >> $GITHUB_STEP_SUMMARY
Expand Down
6 changes: 6 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ env:
# https://github.com/moby/buildkit#export-cache
- DOCKER_BUILDX_CACHE_FROM={{ if index .Env "DOCKER_BUILDX_CACHE_FROM" }}{{ .Env.DOCKER_BUILDX_CACHE_FROM }}{{ else }}type=inline{{ end }}
- DOCKER_BUILDX_CACHE_TO={{ if index .Env "DOCKER_BUILDX_CACHE_TO" }}{{ .Env.DOCKER_BUILDX_CACHE_TO }}{{ else }}type=inline{{ end }}
- GOVERSION={{ if index .Env "GOVERSION" }}{{ .Env.GOVERSION }}{{ else }}go1.20{{ end }}

builds:
- env: [CGO_ENABLED=0]
Expand Down Expand Up @@ -168,6 +169,11 @@ builds:
binary: armadactl
main: ./cmd/armadactl/main.go
mod_timestamp: '{{ .CommitTimestamp }}'
ldflags:
- -X github.com/armadaproject/armada/internal/armadactl/build.ReleaseVersion={{.Version}}
- -X github.com/armadaproject/armada/internal/armadactl/build.GitCommit={{.FullCommit}}
- -X github.com/armadaproject/armada/internal/armadactl/build.BuildTime={{.Date}}
- -X github.com/armadaproject/armada/internal/armadactl/build.GoVersion={{.Env.GOVERSION}}
goos:
- windows
- darwin
Expand Down
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pull_request_rules:
- "#approved-reviews-by>=2"
- and:
- "#approved-reviews-by>=1"
- "author~=^(JamesMurkin|severinson|d80tb7|carlocamurri|dejanzele|Sharpz7|ClifHouck|robertdavidsmith|theAntiYeti|richscott|suprjinx|zuqq)"
- "author~=^(JamesMurkin|severinson|d80tb7|carlocamurri|dejanzele|Sharpz7|ClifHouck|robertdavidsmith|theAntiYeti|richscott|suprjinx|zuqq|msumner91|mustafai)"
title:
Two are checks required.
Loading

0 comments on commit b142a9d

Please sign in to comment.