-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from Clever/SECNG-1830-use-aws-contexts
Use CI context for AWS auth
- Loading branch information
Showing
1 changed file
with
27 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
version: 2 | ||
version: 2.1 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/golang:1.15 | ||
- image: circleci/golang:1.15 | ||
environment: | ||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts | ||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results | ||
steps: | ||
- run: | ||
command: cd $HOME && git clone --depth 1 -v https://github.com/Clever/ci-scripts.git && cd ci-scripts && git show --oneline -s | ||
name: Clone ci-scripts | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- go-mod-v1-{{ checksum "go.sum" }} | ||
- setup_remote_docker | ||
- run: | ||
command: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS | ||
name: Set up CircleCI artifacts directories | ||
- run: make build | ||
- run: make test | ||
- run: $HOME/ci-scripts/circleci/docker-publish $DOCKER_USER $DOCKER_PASS "$DOCKER_EMAIL" $DOCKER_ORG | ||
- run: if [ "${CIRCLE_BRANCH}" == "master" ]; then make VERSION && make deb && cp deb/sphinx.deb sphinx-amd64.deb && $HOME/ci-scripts/circleci/github-release $GH_RELEASE_TOKEN sphinx-amd64.deb; fi; | ||
- save_cache: | ||
key: go-mod-v1-{{ checksum "go.sum" }} | ||
paths: | ||
- "/go/pkg/mod" | ||
- run: | ||
command: cd $HOME && git clone --depth 1 -v https://github.com/Clever/ci-scripts.git && cd ci-scripts && git show --oneline -s | ||
name: Clone ci-scripts | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- go-mod-v1-{{ checksum "go.sum" }} | ||
- setup_remote_docker | ||
- run: | ||
command: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS | ||
name: Set up CircleCI artifacts directories | ||
- run: make build | ||
- run: make test | ||
- run: $HOME/ci-scripts/circleci/docker-publish $DOCKER_USER $DOCKER_PASS "$DOCKER_EMAIL" $DOCKER_ORG | ||
- run: if [ "${CIRCLE_BRANCH}" == "master" ]; then make VERSION && make deb && cp deb/sphinx.deb sphinx-amd64.deb && $HOME/ci-scripts/circleci/github-release $GH_RELEASE_TOKEN sphinx-amd64.deb; fi; | ||
- save_cache: | ||
key: go-mod-v1-{{ checksum "go.sum" }} | ||
paths: | ||
- /go/pkg/mod | ||
workflows: | ||
build_test_publish_deploy: | ||
jobs: | ||
- build: | ||
context: | ||
- aws-ecr-public |