Skip to content

Commit

Permalink
Merge branch 'runatlantis:master' into fix-2135
Browse files Browse the repository at this point in the history
  • Loading branch information
michelmzs authored Mar 13, 2022
2 parents cd672e8 + 76d7080 commit 1e15012
Show file tree
Hide file tree
Showing 242 changed files with 7,129 additions and 3,016 deletions.
28 changes: 1 addition & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
# We do this instead of setting --default-tf-version because setting
# that flag starts the download asynchronously so we'd have a race
# condition.
TERRAFORM_VERSION: 1.0.11
TERRAFORM_VERSION: 1.1.7
steps:
- checkout
- run: make build-service
Expand Down Expand Up @@ -47,22 +47,6 @@ jobs:
--buffer-size 8192 \
http://localhost:8080/
# Build and push Docker tag.
docker_tag:
docker:
- image: circleci/golang:1.17 # If you update this, update it in the Makefile too
steps:
- checkout
- run: make build-service
- setup_remote_docker
- run:
name: Build and tag
command: |
if [ -n "${CIRCLE_TAG}" ]; then
docker build -t "runatlantis/atlantis:${CIRCLE_TAG}" .
docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
docker push "runatlantis/atlantis:${CIRCLE_TAG}"
fi
workflows:
version: 2
branch:
Expand All @@ -81,13 +65,3 @@ workflows:
# the atlantis-e2e-tests context (and also doc PRs).
ignore: /(pull\/\d+)|(docs\/.*)/
- website_link_check
tag:
jobs:
- docker_tag:
context:
- docker-push
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
7 changes: 6 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
*
!cmd/
!server/
!testdrive/
!main.go
!go.mod
!go.sum
!docker-entrypoint.sh
!atlantis
35 changes: 26 additions & 9 deletions .github/workflows/atlantis-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
paths:
- 'docker-base/**'
- '.github/workflows/atlantis-base.yml'
branches:
- "master"
workflow_dispatch:
Expand All @@ -12,23 +13,39 @@ defaults:
run:
working-directory: docker-base

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: arm64,arm

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

- name: Login to Packages Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: echo "TODAY=$(date +"%Y.%m.%d")" >> $GITHUB_ENV
- name: build atlantis-base:${{env.TODAY}} image
run: |
docker build -t ghcr.io/runatlantis/atlantis-base:${{env.TODAY}} .
- name: publish atlantis-base:${{env.TODAY}} image
run: |
docker push ghcr.io/runatlantis/atlantis-base:${{env.TODAY}}
docker tag ghcr.io/runatlantis/atlantis-base:${{env.TODAY}} ghcr.io/runatlantis/atlantis-base:latest
docker push ghcr.io/runatlantis/atlantis-base:latest

- name: Build and push atlantis-base:${{env.TODAY}} image
uses: docker/build-push-action@v2
with:
context: docker-base
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
tags: |
ghcr.io/runatlantis/atlantis-base:${{env.TODAY}}
ghcr.io/runatlantis/atlantis-base:latest
62 changes: 37 additions & 25 deletions .github/workflows/atlantis-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,33 @@ name: atlantis-image
on:
push:
branches:
- "master"
release:
types:
- "published"
- 'master'
tags:
- 'v*.*.*'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: arm64,arm

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

- name: Login to Packages Container registry
uses: docker/login-action@v1
with:
Expand All @@ -25,28 +38,27 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

# Publish dev image to container registry
- name: build atlantis:dev image
if: ${{ github.event_name == 'push'}}
run: |
make build-service
docker build -t ghcr.io/runatlantis/atlantis:dev .
- name: publish atlantis:dev image
- name: Build and push atlantis:dev image
if: ${{ github.event_name == 'push'}}
run: |
docker push ghcr.io/runatlantis/atlantis:dev
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
tags: |
ghcr.io/runatlantis/atlantis:dev
# Publish release to container registry
- name: populate release version
if: ${{ github.event_name == 'release'}}
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: build atlantis:$RELEASE_VERSION release image
if: ${{ github.event_name == 'release'}}
run: |
make build-service
docker build -t ghcr.io/runatlantis/atlantis:$RELEASE_VERSION .
- name: publish atlantis:$RELEASE_VERSION release image
if: ${{ github.event_name == 'release'}}
run: |
docker push ghcr.io/runatlantis/atlantis:$RELEASE_VERSION
docker tag ghcr.io/runatlantis/atlantis:$RELEASE_VERSION ghcr.io/runatlantis/atlantis:latest
docker push ghcr.io/runatlantis/atlantis:latest
- name: Build and push atlantis:${{ env.RELEASE_VERSION }} image
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
tags: |
ghcr.io/runatlantis/atlantis:${{ env.RELEASE_VERSION }}
ghcr.io/runatlantis/atlantis:latest
6 changes: 5 additions & 1 deletion .github/workflows/ci-link-checker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- "master"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
working-directory: .github/website_link_checker
Expand All @@ -16,7 +20,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Login to Packages Container registry
uses: docker/login-action@v1
with:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ name: linter

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
golangci-lint:
name: runner / golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
Expand All @@ -20,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: revive
uses: reviewdog/action-golangci-lint@v2
with:
Expand All @@ -34,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: errcheck
uses: reviewdog/action-golangci-lint@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Go
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: tester

on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
name: runner / gotest
Expand All @@ -9,5 +15,5 @@ jobs:
# user in image needs write access to do anything
- name: setup
run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: make test-all
42 changes: 27 additions & 15 deletions .github/workflows/testing-env-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,45 @@ name: testing-env-image
on:
push:
paths:
- 'testing/**'
- '.github/workflows/testing-env-image.yml'
- "testing/**"
- ".github/workflows/testing-env-image.yml"
branches:
- 'master'
- "master"
workflow_dispatch:

defaults:
run:
working-directory: testing
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: arm64,arm

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

- name: Login to Packages Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- run: echo "TODAY=$(date +"%Y.%m.%d")" >> $GITHUB_ENV
- name: build testing-env:${{env.TODAY}} image
run: |
docker build -t ghcr.io/runatlantis/testing-env:${{env.TODAY}} .
- name: publish testing-env:${{env.TODAY}} image
run: |
docker push ghcr.io/runatlantis/testing-env:${{env.TODAY}}
docker tag ghcr.io/runatlantis/testing-env:${{env.TODAY}} ghcr.io/runatlantis/testing-env:latest
docker push ghcr.io/runatlantis/testing-env:latest
- name: Build and push testing-env:${{env.TODAY}} image
uses: docker/build-push-action@v2
with:
context: testing
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
tags: |
ghcr.io/runatlantis/testing-env:${{env.TODAY}}
ghcr.io/runatlantis/testing-env:latest
Loading

0 comments on commit 1e15012

Please sign in to comment.