https://github.com/codacy/ci-aws
Docker image with awscli installed
https://github.com/codacy/ci-aws
Last synced: 2 months ago
JSON representation
Docker image with awscli installed
- Host: GitHub
- URL: https://github.com/codacy/ci-aws
- Owner: codacy
- Created: 2018-08-14T16:50:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-04T15:28:41.000Z (almost 2 years ago)
- Last Synced: 2025-02-16T11:27:59.000Z (11 months ago)
- Language: Python
- Size: 97.7 KB
- Stars: 1
- Watchers: 13
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ci-aws
[](https://www.codacy.com/gh/codacy/ci-aws?utm_source=github.com&utm_medium=referral&utm_content=codacy/ci-aws&utm_campaign=Badge_Grade)
[](https://microbadger.com/images/codacy/ci-aws "Get your own version badge on microbadger.com")
Docker image to be used in Continuous Integration environments such as CircleCI, with tools to interact with AWS
## Usage
#### CircleCI
Use this image directly on CircleCI for simple steps
```
version: 2
jobs:
build:
working_directory: /app
docker:
- image: codacy:ci-aws:1.0.0
steps:
- checkout
- setup_credentials:
name: setup aws credentials
command: |
mkdir -p ~/.aws && touch ~/.aws/credentials
cat >> ~/.aws/credentials << EOF
[default]
aws_access_key_id=$ACCESS_KEY_ID
aws_secret_access_key=$SECRET_ACCESS_KEY
[ci_role]
source_profile = default
role_arn = arn:aws:iam::$PRODUCTION_AWS_ACCOUNT_ID:role/$PRODUCTION_ROLE
EOF
- run:
name: get new version
command: sceptre lunch-env dev
environment:
AWS_PROFILE: ci_role
```
# Build and Publish
The pipeline in `circleci` can deploy this for you when the code is pushed to the remote.
You can also run everything locally using the makefile
```
$ make help
---------------------------------------------------------------------------------------------------------
build and deploy help
---------------------------------------------------------------------------------------------------------
build build docker image
get-next-version-number get next version number
git-tag tag the current commit with the next version and push
push-docker-image push the docker image to the registry (DOCKER_USER and DOCKER_PASS mandatory)
push-latest-docker-image push the docker image with the "latest" tag to the registry (DOCKER_USER and DOCKER_PASS mandatory)
```