Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into merge-upstream2
Browse files Browse the repository at this point in the history
# Conflicts:
#	server/events/delete_lock_command_test.go
  • Loading branch information
ghaiszaher committed Dec 12, 2022
2 parents 4d3a63b + ada4e53 commit da83da8
Show file tree
Hide file tree
Showing 224 changed files with 2,727 additions and 1,758 deletions.
9 changes: 4 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ version: 2
jobs:
test:
docker:
- image: ghcr.io/runatlantis/testing-env:2021.08.31
- image: ghcr.io/runatlantis/testing-env:2022.11.17
steps:
- checkout
- run: make test-all
- run: make check-fmt
- run: make check-lint
e2e:
docker:
- image: circleci/golang:1.17 # If you update this, update it in the Makefile too
- image: cimg/go:1.19 # If you update this, update it in the Makefile too
environment:
# This version of TF will be downloaded before Atlantis is started.
# 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.3.1
TERRAFORM_VERSION: 1.3.5
steps:
- checkout
- run: make build-service
Expand All @@ -42,7 +41,7 @@ jobs:
- run: |
dockerize -wait tcp://localhost:8080 -- \
muffet \
-e 'https://github\.com/runatlantis/atlantis/edit/master/.*' \
-e 'https://github\.com/runatlantis/atlantis/edit/main/.*' \
-e 'https://github.com/runatlantis/helm-charts#customization' \
--header 'Accept-Encoding:deflate, gzip' \
--buffer-size 8192 \
Expand Down
20 changes: 12 additions & 8 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,37 @@ assignees: ''

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
* If you are interested in working on this issue or have submitted a pull request, please leave a comment.
- Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.

<!--- Thank you for keeping this note for the community --->

---

- [ ] I'd be willing to implement this feature ([contributing guide](https://github.com/runatlantis/atlantis/blob/master/CONTRIBUTING.md))
- [ ] I'd be willing to implement this feature ([contributing guide](https://github.com/runatlantis/atlantis/blob/main/CONTRIBUTING.md))

**Describe the user story**

<!--
A clear and concise description of what workflow is meant to be improved.
Example: "As a developer, I often want to do <something>, but I often face <problem>".
-->

**Describe the solution you'd like**

<!--
A clear and concise description of what you want to happen. Consider that atlantis is used
by many people, and your particular use case might not make sense to implement in the core.
-->

**Describe the drawbacks of your solution**

<!--
This section is important not only to identify future issues, but also for us to see whether
you thought through your request. When filling it, ask yourself what are the problems we could
have maintaining what you propose. How often will it break?
-->

**Describe alternatives you've considered**

<!--
A clear and concise description of any alternative solutions or features you've considered,
and why you think they wouldn't be good enough.
-->
8 changes: 6 additions & 2 deletions .github/workflows/atlantis-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ on:
- 'docker-base/**'
- '.github/workflows/atlantis-base.yml'
branches:
- "master"
- "main"
pull_request:
paths:
- 'docker-base/**'
- '.github/workflows/atlantis-base.yml'
workflow_dispatch:

defaults:
Expand Down Expand Up @@ -45,7 +49,7 @@ jobs:
with:
context: docker-base
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis-base:${{env.TODAY}}
ghcr.io/${{ github.repository_owner }}/atlantis-base:latest
37 changes: 17 additions & 20 deletions .github/workflows/atlantis-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ name: atlantis-image
on:
push:
branches:
- 'master'
- 'main'
tags:
- v*.*.* # stable release like, v0.19.2
- v*.*.*-pre.* # pre release like, v0.19.0-pre.calendardate
pull_request:
paths:
- 'Dockerfile'
- '.github/workflows/atlantis-image.yml'
workflow_dispatch:

concurrency:
Expand All @@ -20,7 +24,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -40,38 +44,31 @@ jobs:

# Publish dev image to container registry
- name: Build and push atlantis:dev image
if: ${{ github.event_name == 'push'}}
if: ${{ contains(fromJson('["push", "pull_request"]'), github.event_name) }}
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis:dev
# Publish release to container registry
- name: populate release version
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
if: |
contains(fromJson('["push", "pull_request"]'), github.event_name) &&
startsWith(github.ref, 'refs/tags/')
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Build and push atlantis:${{ env.RELEASE_VERSION }} image for pre release
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-pre.') }}
- name: Build and push atlantis:${{ env.RELEASE_VERSION }} image for ${{ contains(github.ref, 'pre') ? "pre" : "stable" }} release
if: |
contains(fromJson('["push", "pull_request"]'), github.event_name) &&
startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis:${{ env.RELEASE_VERSION }}
ghcr.io/${{ github.repository_owner }}/atlantis:latest
- name: Build and push atlantis:${{ env.RELEASE_VERSION }} image for stable release
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && (!contains(github.ref, '-pre.')) }}
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis:${{ env.RELEASE_VERSION }}
ghcr.io/${{ github.repository_owner }}/atlantis:prerelease-latest
ghcr.io/${{ github.repository_owner }}/atlantis:${{ contains(github.ref, 'pre') ? "prerelease-latest" : "latest") }}
2 changes: 1 addition & 1 deletion .github/workflows/ci-link-checker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
paths:
- '.github/website_link_checker/**'
branches:
- "master"
- "main"
workflow_dispatch:

concurrency:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19

- name: Run GoReleaser for stable release
uses: goreleaser/goreleaser-action@v3
Expand All @@ -35,7 +35,7 @@ jobs:
echo "::set-output name=RELEASE_TAG::${GITHUB_REF#refs/tags/}"
gh api repos/$GITHUB_REPOSITORY/releases/generate-notes \
-f tag_name="${GITHUB_REF#refs/tags/}" \
-f target_commitish=master \
-f target_commitish=main \
-q .body > tmp-CHANGELOG.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ jobs:
steps:
- uses: actions/stale@v6
with:
stale-pr-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
days-before-stale: 30
days-before-close: 5
stale-pr-message: 'This issue is stale because it has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 1 month.'
stale-issue-message: This issue is stale because it has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 1 month.'
remove-stale-when-updated: true
# 6 months
days-before-stale: 183
# 1 month
days-before-close: 31
only-labels: 'waiting-on-response'
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: tester
on:
push:
branches:
- "master"
- "main"
pull_request:
branches:
- "master"
- "main"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -15,10 +15,7 @@ jobs:
test:
name: runner / gotest
runs-on: ubuntu-22.04
container: ghcr.io/runatlantis/testing-env:2021.08.31
container: ghcr.io/runatlantis/testing-env:2022.11.17
steps:
# user in image needs write access to do anything
- name: setup
run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp
- uses: actions/[email protected]
- run: make test-all
8 changes: 6 additions & 2 deletions .github/workflows/testing-env-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ on:
- "testing/**"
- ".github/workflows/testing-env-image.yml"
branches:
- "master"
- "main"
pull_request:
paths:
- 'testing/**'
- '.github/workflows/testing-env-image.yml'
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -41,7 +45,7 @@ jobs:
with:
context: testing
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/runatlantis/testing-env:${{env.TODAY}}
ghcr.io/runatlantis/testing-env:latest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ golangci-lint
atlantis
.devcontainer
atlantis.env
*.act

# gitreleaser
dist/
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ linters:
- gosec
- gosimple
- ineffassign
- interfacer
- staticcheck
- structcheck
- typecheck
Expand Down
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# v0.20.0
# v0.20.1

Bugfixes and new Features

## What's Changed

https://github.com/runatlantis/atlantis/releases/tag/v0.20.1

# v0.20.0

Broken build due to github action issues

## What's Changed

https://github.com/runatlantis/atlantis/releases/tag/v0.20.0

# v0.19.8
Expand Down Expand Up @@ -1715,7 +1723,7 @@ These are the changes in detail:
```

The `w` group permission was added so that in OpenShift, the random uid can write
their own login entry (https://github.com/runatlantis/atlantis/blob/master/docker-entrypoint.sh#L28)
their own login entry (https://github.com/runatlantis/atlantis/blob/main/docker-entrypoint.sh#L28)
which is required because `terraform` expects the running user to have an entry
in `/etc/passwd`.

Expand Down Expand Up @@ -2458,7 +2466,7 @@ None
assume role session with the GitHub username of the user running the Atlantis command
use the `atlantis_user` terraform variable alongside Terraform's
[built-in support](https://www.terraform.io/docs/providers/aws/#assume-role) for assume role
(see https://github.com/runatlantis/atlantis/blob/master/README.md#assume-role-session-names)
(see https://github.com/runatlantis/atlantis/blob/main/README.md#assume-role-session-names)
* Atlantis has a docker image now ([#123](https://github.com/hootsuite/atlantis/pull/123)). Here is how you can try it out:

```bash
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
* When sending lengthy log-files, consider posting them as a gist (https://gist.github.com). Don't forget to remove sensitive data from your logfiles before posting (you can replace those parts with "REDACTED").

# Reporting Security Issues
We take security issues seriously. Please email us directly at security [at] runatlantis.io instead of opening an issue.
We take security issues seriously. Please report a security vulnerability to the maintainers using [private vulnerability reporting](https://github.com/runatlantis/atlantis/security/advisories/new).

# Updating The Website
* To view the generated website locally, run `yarn website:dev` and then
open your browser to http://localhost:8080.
* The website will be regenerated when your pull request is merged to master.
* The website will be regenerated when your pull request is merged to main.

# Developing

Expand Down Expand Up @@ -78,7 +78,7 @@ docker run --rm -v $(pwd):/go/src/github.com/runatlantis/atlantis -w /go/src/git

## Calling Your Local Atlantis From GitHub
- Create a test terraform repository in your GitHub.
- Create a personal access token for Atlantis. See [Create a GitHub token](https://github.com/runatlantis/atlantis/tree/master/runatlantis.io/docs/access-credentials.md#generating-an-access-token).
- Create a personal access token for Atlantis. See [Create a GitHub token](https://github.com/runatlantis/atlantis/tree/main/runatlantis.io/docs/access-credentials.md#generating-an-access-token).
- Start Atlantis in server mode using that token:
```
atlantis server --gh-user <your username> --gh-token <your token> --repo-allowlist <your repo> --gh-webhook-secret <your webhook secret> --log-level debug
Expand All @@ -88,7 +88,7 @@ atlantis server --gh-user <your username> --gh-token <your token> --repo-allowli
```
ngrok http 4141
```
- Create a Webhook in your repo and use the `https` url that `ngrok` printed out after running `ngrok http 4141`. Be sure to append `/events` so your webhook url looks something like `https://efce3bcd.ngrok.io/events`. See [Add GitHub Webhook](https://github.com/runatlantis/atlantis/blob/master/runatlantis.io/docs/configuring-webhooks.md#configuring-webhooks).
- Create a Webhook in your repo and use the `https` url that `ngrok` printed out after running `ngrok http 4141`. Be sure to append `/events` so your webhook url looks something like `https://efce3bcd.ngrok.io/events`. See [Add GitHub Webhook](https://github.com/runatlantis/atlantis/blob/main/runatlantis.io/docs/configuring-webhooks.md#configuring-webhooks).
- Create a pull request and type `atlantis help`. You should see the request in the `ngrok` and Atlantis logs and you should also see Atlantis comment back.

## Code Style
Expand Down Expand Up @@ -163,15 +163,15 @@ go get github.com/petergtz/pegomock/...
# Creating a New Release
1. Update version number in `main.go`.
1. Update image tag version in the [kustomize/bundle.yaml](kustomize/bundle.yaml).
1. Update `CHANGELOG.md` with latest release number and information (this URL might be useful: https://github.com/runatlantis/atlantis/compare/v0.3.5...master)
1. Create a pull request and merge to master
1. Check out master and fetch latest
1. Update `CHANGELOG.md` with latest release number and information (this URL might be useful: https://github.com/runatlantis/atlantis/compare/v0.3.5...main)
1. Create a pull request and merge to main
1. Check out main and fetch latest
1. Run `make release`
1. If you get `signal: killed` errors, bump up your Docker resources to have more memory, e.g. 6 G.B.
1. Go to https://github.com/runatlantis/atlantis/releases and click "Draft a new release"
1. Prefix version with `v`
1. The title of the release is the same as the tag (ex. v0.2.2)
1. Fill in description by copying from the CHANGELOG just without the Downloads section
1. Drag in binaries made with `make release`
1. Re-run master branch build to ensure tag gets pushed to Github: https://github.com/runatlantis/atlantis/pkgs/container/atlantis
1. Re-run main branch build to ensure tag gets pushed to Github: https://github.com/runatlantis/atlantis/pkgs/container/atlantis
1. Update the default version in `Chart.yaml` in [the official Helm chart](https://github.com/runatlantis/helm-charts/blob/main/charts/atlantis/values.yaml).
Loading

0 comments on commit da83da8

Please sign in to comment.