diff --git a/.circleci/config.yml b/.circleci/config.yml index 56d247c290..e3778ecf6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: test: docker: - - image: ghcr.io/runatlantis/testing-env:805e94e7f648eddb0484e539a7b51410d39529bc + - image: ghcr.io/runatlantis/testing-env:2021.08.31 steps: - checkout - run: make test-all diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 963bbabdb1..d87e08ccfe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,10 +4,10 @@ jobs: test: name: runner / gotest runs-on: ubuntu-latest - container: ghcr.io/runatlantis/testing-env:805e94e7f648eddb0484e539a7b51410d39529bc + container: ghcr.io/runatlantis/testing-env:2021.08.31 steps: # 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 - - run: make test-all \ No newline at end of file + - run: make test-all diff --git a/.github/workflows/testing-env-image.yml b/.github/workflows/testing-env-image.yml new file mode 100644 index 0000000000..20e9756c01 --- /dev/null +++ b/.github/workflows/testing-env-image.yml @@ -0,0 +1,35 @@ +name: testing-env-image + +on: + push: + paths: + - ./testing/** + - .github/workflows/testing-env-image.yml + branches: + - "master" + workflow_dispatch: + +defaults: + run: + working-directory: testing + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - 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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6dbd795026..d478bb58cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,12 +68,12 @@ docker-compose up --detach --build ## Running Tests In Docker: ``` -docker run --rm -v $(pwd):/go/src/github.com/runatlantis/atlantis -w /go/src/github.com/runatlantis/atlantis runatlantis/testing-env make test +docker run --rm -v $(pwd):/go/src/github.com/runatlantis/atlantis -w /go/src/github.com/runatlantis/atlantis ghcr.io/runatlantis/testing-env:latest make test ``` Or to run the integration tests ``` -docker run --rm -v $(pwd):/go/src/github.com/runatlantis/atlantis -w /go/src/github.com/runatlantis/atlantis runatlantis/testing-env make test-all +docker run --rm -v $(pwd):/go/src/github.com/runatlantis/atlantis -w /go/src/github.com/runatlantis/atlantis ghcr.io/runatlantis/testing-env:latest make test-all ``` ## Calling Your Local Atlantis From GitHub