Skip to content

Commit 545b124

Browse files
author
Ludovic Vannoorenberghe
committed
try selfserve migration
1 parent 8f22ac9 commit 545b124

File tree

1 file changed

+14
-59
lines changed

1 file changed

+14
-59
lines changed

.circleci/config.yml

Lines changed: 14 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,23 @@
1-
version: 2
2-
jobs:
3-
build:
4-
environment:
5-
SERVICE: ast-viewer
6-
ENVIRONMENT: staging
7-
docker:
8-
- image: ${STAGING_ECR_URL}/docker-deploy
9-
aws_auth: &ecr_credentials
10-
aws_access_key_id: $STAGING_AWS_ACCESS_KEY_ID
11-
aws_secret_access_key: $STAGING_AWS_SECRET_ACCESS_KEY
12-
steps:
13-
- checkout
14-
- setup_remote_docker
15-
- run:
16-
name: Build application docker image
17-
command: |
18-
docker build -t ${STAGING_ECR_URL}/${SERVICE}:${CIRCLE_SHA1} .
19-
- run:
20-
name: Push image
21-
command: |
22-
DOCKER_IMAGE="${STAGING_ECR_URL}/${SERVICE}" TAG=${CIRCLE_SHA1} /docker-push.sh
23-
deploy:
24-
environment:
25-
SERVICE: ast-viewer
26-
DESIRED_COUNT: "1"
27-
ENVIRONMENT: staging
28-
docker:
29-
- image: ${STAGING_ECR_URL}/docker-deploy
30-
aws_auth: *ecr_credentials
31-
steps:
32-
- checkout
33-
- deploy:
34-
name: Deploy
35-
command: /ecs-deploy.sh
36-
deploy-to-prod:
37-
environment:
38-
SERVICE: ast-viewer
39-
ENVIRONMENT: prod
40-
DESIRED_COUNT: "2"
41-
docker:
42-
- image: ${STAGING_ECR_URL}/docker-deploy
43-
aws_auth: *ecr_credentials
44-
steps:
45-
- checkout
46-
- setup_remote_docker
47-
- deploy:
48-
name: Deploy to prod
49-
command: |
50-
DOCKER_IMAGE="${PROD_ECR_URL}/${SERVICE}" TAG=${CIRCLE_SHA1} /docker-push.sh
51-
/ecs-deploy.sh
1+
version: 2.1
2+
orbs:
3+
datacamp-ecr: datacamp/[email protected]
4+
datacamp-deploy: datacamp/[email protected]
525
workflows:
536
version: 2
547
build_and_deploy:
558
jobs:
56-
- build:
9+
- datacamp-ecr/build_and_push_image_to_ecr:
5710
context: org-global
58-
- deploy:
11+
aws-access-key-id: $STAGING_AWS_ACCESS_KEY_ID
12+
aws-secret-access-key: $STAGING_AWS_SECRET_ACCESS_KEY
13+
account-url: $STAGING_ECR_URL
14+
extra-docker-args: "--build-arg NPM_TOKEN=$NPM_TOKEN"
15+
- datacamp-deploy/deploy:
5916
context: org-global
60-
requires:
61-
- build
62-
filters:
63-
branches:
64-
only:
65-
- master
17+
service-name: ast-viewer
18+
ecs-deploy-url: $STAGING_DEPLOY_URL
19+
ecs-deploy-password: $STAGING_ECS_DEPLOY_PASSW
20+
extra-env: "ENVIRONMENT=staging DESIRED_COUNT=1"
6621
- deploy-to-prod:
6722
context: org-global
6823
filters:

0 commit comments

Comments
 (0)