Commit Graph

123 Commits

Author SHA1 Message Date
Rui Chen
534ccb049e deps(docker): bump atlantis-base from 2022.03.03 to 2022.03.04 (multi-platform image)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-03-04 14:05:06 -05:00
Jeppe Fihl-Pearson
19d41abc3c fix(docker): Multi-arch Docker images, attempt two (#2114)
* fix(docker): fix base image for multi-platform build (#2099)

* Correct indentation of run commands

* Split installation of packages into the ones needed at run time and build time

This allows us to now repeat the packages which need to be uninstalled again by
making use of a virtual package, which - when removed - removes the packages
installed as a dependency of it.

* Remove unnecessary `rm -rf /var/cache/apk/*` command

It's no needed when `apt add` is run with the `--no-cache` option.

* Add vertical spacing so it's clearer what is happening when

* Test the downloaded binaries to make sure they work on the platform

This can help find issues where binaries are downloaded for the wrong platform
compared to the architecture the Docker image is built for.

* Install dumb-init via apk

It's available as a package for Alpine Linux in version 1.2.5 as well, which
makes it easier to handle for the different architectures.

* Get git-lfs binaries in the right architecture for the Docker image

This makes use of the `TARGETPLATFORM` argument which automatically is
populated by Docker BuildKit with a string such as "linux/amd64" when the image
is being build for an x86_64 architecture.

* Install gosu for the right architecture

The `case` statement was taken from
https://github.com/BretFisher/multi-platform-docker-build as a way of
translating the platform name into what we needed for downloading gosu.

* fix(docker): fix installation of git-lfs in armv7 image (#2100)

This uses a similar pattern than what is used for `GOSU_ARCH` to map the
`TARGETPLATFORM` argument into the name of the architecture git-lfs use for
their release binaries, as "linux/arm/v7" otherwise would be mapped into "v7"
which is wrong.

* fix(docker): download Terraform and conftest versions maching image architecture (#2101)

* Remove Terraform versions from Docker image which don't have all archs

Terraform versions earlier than 0.11.15 does not have binaries available for
both amd64, arm64 and armv7, so are being dropped as we can't install the older
versions in all the architectures the Docker image is built for.

* Download Terraform version depending on the architecture Docker image is for

This avoids us having arm64 binaries for the ARM Docker images, which won't
work.

* Download arm64 conftest binaries for arm64 Docker image

This doesn't fix the armv7 Docker image because conftest doesn't have a binary
available for that, so it for now still downloads the x86_64 binary, which is
likely to not work - but it's the same as it did before.

* Correct path to dumb-init in docker-entrypoint.sh

The path changed after dumb-init was switched to be installed via `apk` rather
than downloaded directly as a binary.
2022-03-04 13:51:00 -05:00
rui
46cd2fb49b deps: tf 1.1.7 (#2108)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-03-02 20:44:28 -05:00
Rui Chen
8337262fd2 deps(docker): bump atlantis-base from 2022.03.02 to 2022.03.03
Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-03-02 20:09:47 -05:00
rui
1b145dac27 fix(docker): fix docker runtime issue (#2106)
* debug setup

* Revert "fix(docker): download Terraform and conftest versions maching image architecture (#2101)"

This reverts commit 579e583740.

* Revert "fix(docker): fix installation of git-lfs in armv7 image (#2100)"

This reverts commit 8af78838b6.

* Revert "fix(docker): fix base image for multi-platform build (#2099)"

This reverts commit 571543fdfb.

* Revert "debug setup"

This reverts commit 274501ab6e.
2022-03-02 20:01:28 -05:00
Jeppe Fihl-Pearson
579e583740 fix(docker): download Terraform and conftest versions maching image architecture (#2101)
* Remove Terraform versions from Docker image which don't have all archs

Terraform versions earlier than 0.11.15 does not have binaries available for
both amd64, arm64 and armv7, so are being dropped as we can't install the older
versions in all the architectures the Docker image is built for.

* Download Terraform version depending on the architecture Docker image is for

This avoids us having arm64 binaries for the ARM Docker images, which won't
work.

* Download arm64 conftest binaries for arm64 Docker image

This doesn't fix the armv7 Docker image because conftest doesn't have a binary
available for that, so it for now still downloads the x86_64 binary, which is
likely to not work - but it's the same as it did before.
2022-03-02 12:20:00 -05:00
Rui Chen
23e2b155bd deps(docker): use atlantis-base:2022.03.02
Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-03-02 00:32:39 -05:00
dependabot[bot]
fd02ebedbd build(deps): bump runatlantis/atlantis-base (#2088)
Bumps runatlantis/atlantis-base from 2021.12.15 to 2022.02.23.

---
updated-dependencies:
- dependency-name: runatlantis/atlantis-base
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-01 22:43:45 -05:00
rui
60a168d417 deps: tf 1.1.6 (#2071)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-02-16 15:42:38 -05:00
Rob Lazzurs
6d2ad22a0c deps: terraform 1.1.5 (#2042)
Upgrading to the latest Terraform release
2022-02-02 17:54:30 -05:00
rui
d8ec4387ae deps: tf 1.1.4 (#2011)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-01-19 14:18:52 -05:00
rui
3f18ba2f99 deps: conftest 0.30.0 (#1983)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-01-10 10:13:00 -05:00
rui
44ab8f216c deps: terraform 1.1.3 (#1982)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-01-07 00:48:13 -05:00
rui
8ed966f1aa deps: conftest 0.29.0 (#1977)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2022-01-05 11:25:51 -05:00
Javier Beaumont
f4582101cb Add in Dockerfile support for last Terraform 1.0.x version in AVAILABLE_TERRAFORM_VERSIONS (#1957) 2021-12-21 15:55:56 -08:00
rui
50a510fa26 deps: terraform 1.1.2 (#1952) 2021-12-18 13:09:34 -05:00
rui
45e8513f23 docker: make multi-platform atlantis image (#1943)
* docker: multi-platform image for atlantis

* workflow: update for multi platform image builds

Signed-off-by: Rui Chen <rui@chenrui.dev>

* update branch trigger for testing dev image

Signed-off-by: Rui Chen <rui@chenrui.dev>

* revert to use testing-env:2021.08.31

Signed-off-by: Rui Chen <rui@chenrui.dev>

* Revert "update branch trigger for testing dev image"

This reverts commit 266e04da08.
2021-12-17 14:41:05 -05:00
rui
a74e740c11 deps: terraform 1.1.1 (#1939)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-12-15 17:03:41 -05:00
rui
8aa1ea4d04 deps: terraform 1.1.0 (#1930)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-12-08 17:07:08 -05:00
rui
6d86119d75 deps: tf 1.0.11 (#1892) 2021-11-10 18:44:50 -05:00
Rui Chen
ac9a6c3c4f deps: conftest 0.28.3
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-11-03 22:34:39 -04:00
rui
720d8eb2d4 deps: conftest 0.28.2 (#1872) 2021-10-28 14:04:53 -04:00
Rui Chen
cb07e2adb0 deps: tf 1.0.10 2021-10-28 13:46:36 -04:00
rui
8093b8864a deps: update conftest to 0.28.1 for atlantis img (#1864)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-10-19 12:35:10 -04:00
rui
515df4edb1 deps: terraform 1.0.9 (#1854)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-10-17 13:46:47 -04:00
rui
c3d9e136ce deps: tf 1.0.8 (#1837)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-09-30 23:33:24 -04:00
rui
bf63dde18b build: tf 1.0.7 (#1811)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-09-15 17:15:53 -04:00
dependabot[bot]
b4cb071907 build(deps): bump runatlantis/atlantis-base (#1794)
Bumps runatlantis/atlantis-base from 2021.06.22 to 2021.08.31.

---
updated-dependencies:
- dependency-name: runatlantis/atlantis-base
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-08 15:03:52 -04:00
rui
db1cb4a649 build: tf 1.0.6 (#1786)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-09-03 11:41:18 -04:00
rui
9b5f9e181a deps: tf 1.0.5 (#1765)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-08-18 19:03:45 -04:00
rui
3495fec592 deps: tf 1.0.4 (#1748) 2021-08-09 10:37:19 -04:00
rui
170154b492 deps: tf 1.0.3 (#1719) 2021-07-27 20:17:00 -04:00
rui
a04915548a deps: tf 1.0.2 (#1693)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-07-07 16:43:24 -04:00
rui
ab8d64492c deps: terraform 1.0.1 (#1662)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-06-24 12:46:32 -04:00
rui
7b2ddce5ac docker: update atlantis-base per ghcr.io migration (#1653)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-06-22 19:01:52 -04:00
rui
10e619b16b deps: terraform 1.0.0 (#1622) 2021-06-16 10:26:11 -04:00
rui
d6b6f12e36 deps: terraform 0.15.5 (#1615) 2021-06-02 15:18:40 -04:00
rui
7cb439f4cd deps: terraform 0.15.4 (#1588)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-05-19 15:49:32 -04:00
Sarvar Muminov
805e94e7f6 Update conftest version to 0.25.0. (#1579)
Version 0.25.0 solves OOM issue described in [556](https://github.com/open-policy-agent/conftest/pull/556).
2021-05-13 14:05:06 -07:00
Dogers
bc2b390431 Update Terraform 0.11.14 version to latest 0.11.15 (#1564)
* Update Docker file to 0.11.15 for PGP issue

* Update other references to TF 0.11 to latest 0.11.15
2021-05-10 13:58:36 -04:00
rui
df7b1c9ce3 deps: tf 0.15.3 (#1561)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-05-07 19:07:23 -04:00
rui
ffe1da1b82 deps: tf 0.15.2 (#1559)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-05-05 18:27:41 -04:00
Bryant Biggs
04824c2dea chore: bump terraform version to latest 0.15.1 (#1512)
* chore: bump terraform version to latest 0.15.0

* chore: add v0.14.10 to available versions list

* chore: fix trailing zero typo

* chore: bump to 0.15.1 now that its released

* chore: bump 0.14.x version which updates Hashicorp public key

* chore: bump 0.13.x version which updates Hashicorp public key

* chore: bump 0.12.x version which updates Hashicorp public key
2021-04-26 15:10:18 -07:00
Sarvar Muminov
f0201e9eb7 Upgrade conftest version to 0.23 (#1516)
* Upgraded conftest to 0.23.0 and removed --all-namespaces flag (#62)

* Upgraded conftest to 0.23.0 and removed --all-namespaces flag

* fix tests

* fix conftest version name

* make tests pass

* Update e2e tests to use 0.23 conftest

* Fix log function

* Make test client fetch version synchronously.

* Update fixtures.

* Pinning test image

Co-authored-by: Nish Krishnan <nishk@lyft.com>
2021-04-22 20:21:17 -07:00
rui
921ebbc48d deps: tf 0.14.10 (#1488)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-04-07 21:15:55 -04:00
rui
ca976d8bd3 deps: use tf 0.14.9 (#1472)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-03-25 01:33:44 -04:00
rui
0e61fa521c deps: use tf 0.14.8 (#1448)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-03-10 13:47:49 -05:00
rui
4fc136c048 chore(deps): update tf to v0.14.7 (#1416)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-02-17 17:58:01 -05:00
rui
29a369a238 deps: bump tf to v0.14.6 (#1402)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-02-12 12:04:21 -05:00
Sarvar Muminov
af2a806870 Implement a new policy check workflow (#1317)
* Adding policy_check support into yaml config

* Added policy check model and runtime structs

* Adding BuildPolicyCheckCommand to ProjectCommandBuilder

* Return incorrectly deleted code

* Remove BuildAutoPolicyPlanCommand from ProjectCommandBuilder

* Split runAutoCommand into two functions

runAutoPlanCommand - does what originally RunAutoplancommand was doing
except now it returns CommandResult and []models.ProjectCommandContext
runAutoPolicyCheckCommand - accepts CommandContext, CommandResult, and
[]models.ProjectCommandContext as arguments and runs PolicyCheckStep runner

* Refactor RunCommentCommand
* Remove BuildPolicyCheckCommand and rename StepCmdExec back to TerraformExec
* Add policy step runner logic and conftest interfaces.
* Add show step runner to policy check stage.

* Adding models.PolicyCheckCommand to buildCtx

This also means buildPlanAllCommands call buildCtx twice once with
models.PlanCommand and once with models.PolicyCheckCommand

* Adding new project_command_builder that supports policy_check

* Refactoring PolicyCheck specific logic into a PolicyCheckProjectCommandBuilder

* Moving events.CommandContext to models.CommandContext this will allow me
to remove buildCtx method and move ProjectCommandContext creation into
models package

* Policy Owners might be different types, for that reason we are
refactoring Owners into its own struct with specific keys defining
different owner types

Co-authored-by: Nish Krishnan <nishk@lyft.com>
Co-authored-by: Nish Krishnan <nishkrishnan@users.noreply.github.com>
2021-02-10 18:13:44 -08:00