Skip to content

Commit

Permalink
Merge branch 'main' into remove_require_flags
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemassa authored Dec 18, 2023
2 parents 0498fc6 + a828ee8 commit 0972de4
Show file tree
Hide file tree
Showing 78 changed files with 130 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
# that flag starts the download asynchronously so we'd have a race
# condition.
# renovate: datasource=github-releases depName=hashicorp/terraform versioning=hashicorp
TERRAFORM_VERSION: 1.6.5
TERRAFORM_VERSION: 1.6.6
steps:
- checkout
- run: make build-service
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -85,7 +85,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -98,7 +98,7 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ RUN AVAILABLE_CONFTEST_VERSIONS=${DEFAULT_CONFTEST_VERSION} && \

# install git-lfs
# renovate: datasource=github-releases depName=git-lfs/git-lfs
ENV GIT_LFS_VERSION=3.4.0
ENV GIT_LFS_VERSION=3.4.1

RUN case ${TARGETPLATFORM} in \
"linux/amd64") GIT_LFS_ARCH=amd64 ;; \
Expand Down
29 changes: 29 additions & 0 deletions cmd/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@ func (s *ServerStarterMock) Start() error {
// Adding a new flag? Add it to this slice for testing in alphabetical
// order.
var testFlags = map[string]interface{}{
ADHostnameFlag: "dev.azure.com",
ADTokenFlag: "ad-token",
ADUserFlag: "ad-user",
ADWebhookPasswordFlag: "ad-wh-pass",
ADWebhookUserFlag: "ad-wh-user",
AtlantisURLFlag: "url",
AutoplanModules: false,
AutoplanModulesFromProjects: "",
AllowCommandsFlag: "version,plan,apply,unlock,import,approve_policies",
AllowForkPRsFlag: true,
APISecretFlag: "",
AutoDiscoverModeFlag: "auto",
AutomergeFlag: true,
AutoplanFileListFlag: "**/*.tf,**/*.yml",
Expand All @@ -67,13 +71,19 @@ var testFlags = map[string]interface{}{
BitbucketUserFlag: "bitbucket-user",
BitbucketWebhookSecretFlag: "bitbucket-secret",
CheckoutStrategyFlag: CheckoutStrategyMerge,
CheckoutDepthFlag: 0,
DataDirFlag: "/path",
DefaultTFVersionFlag: "v0.11.0",
DisableApplyAllFlag: true,
DisableMarkdownFoldingFlag: true,
DisableRepoLockingFlag: true,
DiscardApprovalOnPlanFlag: true,
EmojiReaction: "eyes",
ExecutableName: "atlantis",
FailOnPreWorkflowHookError: false,
GHAllowMergeableBypassApply: false,
GHHostnameFlag: "ghhostname",
GHTeamAllowlistFlag: "",
GHTokenFlag: "token",
GHUserFlag: "user",
GHAppIDFlag: int64(0),
Expand All @@ -86,6 +96,9 @@ var testFlags = map[string]interface{}{
GitlabTokenFlag: "gitlab-token",
GitlabUserFlag: "gitlab-user",
GitlabWebhookSecretFlag: "gitlab-secret",
HideUnchangedPlanComments: false,
HidePrevPlanComments: false,
IncludeGitUntrackedFiles: false,
LockingDBType: "boltdb",
LogLevelFlag: "debug",
MarkdownTemplateOverridesDirFlag: "/path2",
Expand All @@ -95,7 +108,16 @@ var testFlags = map[string]interface{}{
ParallelPoolSize: 100,
ParallelPlanFlag: true,
ParallelApplyFlag: true,
QuietPolicyChecks: false,
RedisHost: "",
RedisInsecureSkipVerify: false,
RedisPassword: "",
RedisPort: 6379,
RedisTLSEnabled: false,
RedisDB: 0,
RepoAllowlistFlag: "github.com/runatlantis/atlantis",
RepoConfigFlag: "",
RepoConfigJSONFlag: "",
SilenceNoProjectsFlag: false,
SilenceForkPRErrorsFlag: true,
SilenceAllowlistErrorsFlag: true,
Expand All @@ -105,11 +127,18 @@ var testFlags = map[string]interface{}{
SSLCertFileFlag: "cert-file",
SSLKeyFileFlag: "key-file",
RestrictFileList: false,
TFDownloadFlag: true,
TFDownloadURLFlag: "https://my-hostname.com",
TFEHostnameFlag: "my-hostname",
TFELocalExecutionModeFlag: true,
TFETokenFlag: "my-token",
UseTFPluginCache: true,
VarFileAllowlistFlag: "/path",
VCSStatusName: "my-status",
WebBasicAuthFlag: false,
WebPasswordFlag: "atlantis",
WebUsernameFlag: "atlantis",
WebsocketCheckOrigin: false,
WriteGitCredsFlag: true,
DisableAutoplanFlag: true,
DisableAutoplanLabelFlag: "no-auto-plan",
Expand Down
1 change: 1 addition & 0 deletions runatlantis.io/docs/custom-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ by CDKTF will be add to the Atlantis modified file list.
# Dockerfile
FROM ghcr.io/runatlantis/atlantis:v0.19.7
USER root
RUN apk add npm && npm i -g cdktf-cli
```

Expand Down
5 changes: 5 additions & 0 deletions runatlantis.io/docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,14 @@ If you need to modify the Docker image that we provide, for instance to add the
FROM ghcr.io/runatlantis/atlantis:{latest version}
# copy a terraform binary of the version you need
USER root
COPY terragrunt /usr/local/bin/terragrunt
```
Beginning with version 0.26.0, the Atlantis image has been updated to run under the atlantis user, replacing the previous root user configuration. This change necessitates adjustments in existing container definitions and scripts to accommodate the new user settings. In scenarios where additional packages from other images are required, users can temporarily switch to the root user by inserting USER root in the Dockerfile. Following the installation of necessary packages, it is advisable to revert to the atlantis user for initiating the Atlantis service.
Additionally, the /docker-entrypoint.d/ directory offers a flexible option for introducing extra scripts to be executed prior to the launch of the Atlantis server. This feature is particularly beneficial for users seeking to customize their Atlantis instance without the need to develop a dedicated pipeline.
**Important Notice**: There is a critical update regarding the data directory in Atlantis. In versions prior to 0.26.0, the directory was configured to be accessible by the root user. However, with the transition to the atlantis user in newer versions, it is imperative to update the directory permissions accordingly in your current deployment when upgrading to a version later than 0.26.0. This step ensures seamless access and functionality for the atlantis user.
1. Build your Docker image
```bash
docker build -t {YOUR_DOCKER_ORG}/atlantis-custom .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ Plan: 2 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ and found no differences, so no changes are needed.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ Plan: 2 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ and found no differences, so no changes are needed.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ and found no differences, so no changes are needed.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ policy set: test_policy: requires: 1 approval(s), have: 0.
---
* :heavy_check_mark: To **approve** all unapplied plans from this pull request, comment:
* `atlantis approve_policies`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
* :repeat: To re-run policies **plan** this project again by commenting:
* `atlantis plan`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ policy set: test_policy: requires: 1 approval(s), have: 0.
---
* :heavy_check_mark: To **approve** all unapplied plans from this pull request, comment:
* `atlantis approve_policies`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
* :repeat: To re-run policies **plan** this project again by commenting:
* `atlantis plan`
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ policy set: test_policy: requires: 1 approval(s), have: 0.
---
* :heavy_check_mark: To **approve** all unapplied plans from this pull request, comment:
* `atlantis approve_policies`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
* :repeat: To re-run policies **plan** this project again by commenting:
* `atlantis plan`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ policy set: test_policy: requires: 1 approval(s), have: 0.
---
* :heavy_check_mark: To **approve** all unapplied plans from this pull request, comment:
* `atlantis approve_policies`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
* :repeat: To re-run policies **plan** this project again by commenting:
* `atlantis plan`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ policy set: test_policy: requires: 1 approval(s), have: 0.
---
* :heavy_check_mark: To **approve** all unapplied plans from this pull request, comment:
* `atlantis approve_policies`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
* :repeat: To re-run policies **plan** this project again by commenting:
* `atlantis plan`
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ policy set: test_policy: requires: 1 approval(s), have: 0.
---
* :heavy_check_mark: To **approve** all unapplied plans from this pull request, comment:
* `atlantis approve_policies`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
* :repeat: To re-run policies **plan** this project again by commenting:
* `atlantis plan`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ policy set: test_policy: requires: 1 approval(s), have: 0.
---
* :heavy_check_mark: To **approve** all unapplied plans from this pull request, comment:
* `atlantis approve_policies`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
* :repeat: To re-run policies **plan** this project again by commenting:
* `atlantis plan`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ policy set: test_policy: requires: 1 approval(s), have: 0.
---
* :heavy_check_mark: To **approve** all unapplied plans from this pull request, comment:
* `atlantis approve_policies`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
* :repeat: To re-run policies **plan** this project again by commenting:
* `atlantis plan`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ policy set: test_policy: requires: 1 approval(s), have: 0.
---
* :heavy_check_mark: To **approve** all unapplied plans from this pull request, comment:
* `atlantis approve_policies`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
* :repeat: To re-run policies **plan** this project again by commenting:
* `atlantis plan`
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Plan: 1 to add, 0 to change, 0 to destroy.
---
* :fast_forward: To **apply** all unapplied plans from this pull request, comment:
* `atlantis apply`
* :put_litter_in_its_place: To delete all plans and locks for the PR, comment:
* :put_litter_in_its_place: To **delete** all plans and locks for the PR, comment:
* `atlantis unlock`
Loading

0 comments on commit 0972de4

Please sign in to comment.