Skip to content

Commit

Permalink
Merge pull request #98 from Clever/SECNG-1830-use-aws-contexts
Browse files Browse the repository at this point in the history
Use CI context for AWS auth
  • Loading branch information
taylor-sutton authored May 2, 2024
2 parents b6ffd67 + 50fb9e4 commit ecd4af7
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions .circleci/config.yml
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

0 comments on commit ecd4af7

Please sign in to comment.