Skip to content

Commit 7d31f5a

Browse files
author
Irving Popovetsky
committed
Undoing my bad advice and fixing this config
Signed-off-by: Irving Popovetsky <irving@honeycomb.io>
1 parent 829fa4d commit 7d31f5a

1 file changed

Lines changed: 17 additions & 43 deletions

File tree

.circleci/config.yml

Lines changed: 17 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
version: 2.1
2-
parameters:
3-
aws-profile:
4-
type: string
5-
default: default
6-
aws-region:
7-
type: string
8-
default: us-east-2
9-
cluster-name:
10-
type: string
11-
default: operationcode-backend
122

133
orbs:
144
docker: circleci/docker@0.5.1
@@ -37,66 +27,50 @@ workflows:
3727
only:
3828
- main
3929

30+
# Deploy the new docker image to the AWS EKS cluster, staging namespace
31+
- aws-eks/update-container-image:
32+
container-image-updates: 'app=operationcode/resources-api:${CIRCLE_BUILD_NUM}'
33+
cluster-name: 'operationcode-backend'
34+
namespace: 'operationcode-staging'
35+
resource-name: 'deployment/resources-api'
36+
get-rollout-status: true
37+
watch-rollout-status: true
38+
watch-timeout: 5m
39+
record: true
40+
requires:
41+
- docker/publish
42+
filters:
43+
branches:
44+
only:
45+
- main
46+
4047
jobs:
4148
build_test:
42-
4349
machine:
4450
image: ubuntu-1604:201903-01
45-
4651
environment:
4752
CC_TEST_REPORTER_ID: 08bad9e4f229f88064fd6ee1c0fe4f64be37943beff36f37f8b8896123ef6752
4853

4954
steps:
50-
5155
- checkout
52-
5356
- run: sudo chown -R circleci:circleci /usr/local/bin
54-
5557
- run:
5658
name: Initializing CodeClimate
5759
command: |
5860
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > /usr/local/bin/cc-test-reporter
5961
chmod +x /usr/local/bin/cc-test-reporter
6062
/usr/local/bin/cc-test-reporter before-build
61-
6263
- run:
6364
name: Run tests
6465
command: |
6566
make test
66-
67-
6867
- run:
6968
name: Run linting and coverage
7069
command: |
7170
make lint
7271
docker-compose run resources-api coverage xml
7372
/usr/local/bin/cc-test-reporter after-build
74-
7573
- run:
7674
name: Run Bandit security analysis
7775
command: |
7876
make bandit
79-
80-
staging_deploy:
81-
executor: python3
82-
parameters:
83-
cluster-name:
84-
description: |
85-
Operation Code Backend Cluster
86-
type: string
87-
steps:
88-
- update-kubeconfig-with-authenticator:
89-
aws-profile: << parameters.aws-profile >>
90-
aws-region: << parameters.aws-region >>
91-
cluster-name: << parameters.cluster-name >>
92-
install-kubectl: true
93-
- aws-eks/update-container-image:
94-
container-image-updates: 'resources-api=resources-api:${CIRCLE_BUILD_NUM}'
95-
namespace: 'operationcode-staging'
96-
record: true
97-
requires:
98-
- docker/publish
99-
filters:
100-
branches:
101-
only:
102-
- main

0 commit comments

Comments
 (0)