Skip to content

Commit

Permalink
Add cloudposse-atlantis as alternative to runatlantis/atlantis (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Oct 11, 2019
1 parent 5aa24fe commit 8dacc3b
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ docker/build/apk/all:

## Build alpine packages for testing
docker/build/apk/shell:
sudo rm -rf tmp/*
rm -rf tmp/*
[ -n "$(ls tmp/)" ] && sudo rm -rf tmp/* || true
docker build -t cloudposse/apkbuild:$(ALPINE_VERSION) -f apk/Dockerfile-$(ALPINE_VERSION) .
docker run \
--name apkbuild \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,15 @@ packages/uninstall/%:
## Makefile Targets
```
assume-role 0.3.2 Easily assume AWS roles in your terminal.
atlantis 0.4.13 Terraform For Teams
atlantis 0.8.3 Terraform For Teams
awless 0.1.11 A Mighty CLI for AWS
aws-iam-authenticator 0.4.0 A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster
aws-okta 0.19.4 aws-okta allows users to authenticate with AWS using Okta credentials
aws-vault 4.6.4 A vault for securely storing and accessing AWS credentials in development environments
chamber 2.4.0 CLI for managing secrets
cli53 0.8.12 Command line tool for Amazon Route 53
cloudflared 2019.9.0 Argo Tunnel client
cloudposse-atlantis 0.8.0 Terraform For Teams, enhanced by Cloud Posse
codefresh 0.32.1 Codefresh CLI
ctop 0.7.1 Top-like interface for container metrics
direnv 2.20.0 Unclutter your .profile
Expand Down
3 changes: 2 additions & 1 deletion docs/targets.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
## Makefile Targets
```
assume-role 0.3.2 Easily assume AWS roles in your terminal.
atlantis 0.4.13 Terraform For Teams
atlantis 0.8.3 Terraform For Teams
awless 0.1.11 A Mighty CLI for AWS
aws-iam-authenticator 0.4.0 A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster
aws-okta 0.19.4 aws-okta allows users to authenticate with AWS using Okta credentials
aws-vault 4.6.4 A vault for securely storing and accessing AWS credentials in development environments
chamber 2.4.0 CLI for managing secrets
cli53 0.8.12 Command line tool for Amazon Route 53
cloudflared 2019.9.0 Argo Tunnel client
cloudposse-atlantis 0.8.0 Terraform For Teams, enhanced by Cloud Posse
codefresh 0.32.1 Codefresh CLI
ctop 0.7.1 Top-like interface for container metrics
direnv 2.20.0 Unclutter your .profile
Expand Down
4 changes: 4 additions & 0 deletions vendor/atlantis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ include ../../tasks/Makefile.apk
export VENDOR ?= runatlantis
export DOWNLOAD_URL ?= $(PACKAGE_REPO_URL)/releases/download/v$(PACKAGE_VERSION)/$(PACKAGE_NAME)_$(OS)_$(ARCH).zip
export APK_BUILD_TEMPLATE ?= APKBUILD.github-binary
export APKBUILD_DEPENDS += dpkg
export APKBUILD_INSTALL_SCRIPTS = $(PACKAGE_NAME).post-install $(PACKAGE_NAME).post-deinstall
export MASTER_PACKAGE_NAME = atlantis
export INSTALL_DIR = /usr/share/${MASTER_PACKAGE_NAME}/${VENDOR}/bin

install:
$(call download_zip)
Expand Down
2 changes: 1 addition & 1 deletion vendor/atlantis/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.13
0.8.3
9 changes: 9 additions & 0 deletions vendor/atlantis/atlantis.post-deinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# This is an Alpine `deinstall` hook that removes the alternative
MASTER_PACKAGE_NAME=atlantis
PACKAGE_NAME=atlantis
VENDOR=runatlantis
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${VENDOR}/bin

update-alternatives --remove ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
exit 0
10 changes: 10 additions & 0 deletions vendor/atlantis/atlantis.post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
# This is an Alpine Package `post-install` hook that links
# an alternative from `/usr/share/${PACKAGE_NAME}/$version/bin` into `/usr/bin/`
MASTER_PACKAGE_NAME=atlantis
PACKAGE_NAME=atlantis
VENDOR=runatlantis
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${VENDOR}/bin
mkdir -p ${INSTALL_DIR}
update-alternatives --install /usr/bin/${MASTER_PACKAGE_NAME} ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 1
exit 0
1 change: 1 addition & 0 deletions vendor/cloudposse-atlantis/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Terraform For Teams, enhanced by Cloud Posse
1 change: 1 addition & 0 deletions vendor/cloudposse-atlantis/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APACHE-2.0
19 changes: 19 additions & 0 deletions vendor/cloudposse-atlantis/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export MASTER_PACKAGE_NAME = atlantis
export PACKAGE_REPO_NAME = atlantis

include ../../tasks/Makefile.package
include ../../tasks/Makefile.apk

# Package details
export VENDOR ?= cloudposse
export DOWNLOAD_URL ?= $(PACKAGE_REPO_URL)/releases/download/$(PACKAGE_VERSION)/$(PACKAGE_REPO_NAME)_$(OS)_$(ARCH)
export APK_BUILD_TEMPLATE ?= APKBUILD.github-binary
export APKBUILD_DEPENDS += dpkg libc6-compat
export APKBUILD_INSTALL_SCRIPTS = $(PACKAGE_NAME).post-install $(PACKAGE_NAME).post-deinstall
export INSTALL_DIR = /usr/share/${MASTER_PACKAGE_NAME}/${VENDOR}/bin

install:
$(call download_binary)

test:
$(PACKAGE_EXE) version
1 change: 1 addition & 0 deletions vendor/cloudposse-atlantis/RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
1 change: 1 addition & 0 deletions vendor/cloudposse-atlantis/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.8.0
9 changes: 9 additions & 0 deletions vendor/cloudposse-atlantis/cloudposse-atlantis.post-deinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# This is an Alpine `deinstall` hook that removes the alternative
MASTER_PACKAGE_NAME=atlantis
PACKAGE_NAME=cloudposse-atlantis
VENDOR=cloudposse
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${VENDOR}/bin

update-alternatives --remove ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} --quiet
exit 0
10 changes: 10 additions & 0 deletions vendor/cloudposse-atlantis/cloudposse-atlantis.post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
# This is an Alpine Package `post-install` hook that links
# an alternative from `/usr/share/${PACKAGE_NAME}/$version/bin` into `/usr/bin/`
MASTER_PACKAGE_NAME=atlantis
PACKAGE_NAME=cloudposse-atlantis
VENDOR=cloudposse
INSTALL_DIR=/usr/share/${MASTER_PACKAGE_NAME}/${VENDOR}/bin
mkdir -p ${INSTALL_DIR}
update-alternatives --install /usr/bin/${MASTER_PACKAGE_NAME} ${MASTER_PACKAGE_NAME} ${INSTALL_DIR}/${PACKAGE_NAME} 2
exit 0

0 comments on commit 8dacc3b

Please sign in to comment.