File tree Expand file tree Collapse file tree 4 files changed +24
-9
lines changed
Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -13,26 +13,39 @@ workflows:
1313 aws-secret-access-key : $OPS_AWS_SECRET_ACCESS_KEY
1414 account-url : $OPS_ECR_URL
1515 puller-account-ids : ' ["301258414863", "487088987264"]'
16+ extra-docker-args : " --build-arg VERSION=$(git describe --tags)"
1617 repo : rdoc-app
18+ executor : datacamp-ecr/buildkit
19+ filters :
20+ branches :
21+ only :
22+ - master
23+ tags :
24+ only : /^v\d+\.\d+\.\d+$/
1725 - datacamp-deploy/deploy : # Staging
26+ name : deploy-staging
1827 context : org-global
1928 requires :
2029 - build
2130 environment : staging
2231 aws-access-key-id : $STAGING_AWS_ACCESS_KEY_ID
2332 aws-secret-access-key : $STAGING_AWS_SECRET_ACCESS_KEY
33+ extra-env : " VERSION=$(git describe --tags)"
2434 filters :
2535 branches :
2636 only :
2737 - master
2838 - datacamp-deploy/deploy : # Production
39+ name : deploy-production
2940 context : org-global
3041 requires :
3142 - build
3243 environment : prod
3344 aws-access-key-id : $PROD_AWS_ACCESS_KEY_ID
3445 aws-secret-access-key : $PROD_AWS_SECRET_ACCESS_KEY
46+ extra-env : " VERSION=$(git describe --tags)"
3547 filters :
48+ tags :
49+ only : /^v\d+\.\d+\.\d+$/
3650 branches :
37- only :
38- - master
51+ ignore : /.*/
Original file line number Diff line number Diff line change 11FROM node:8.16
22
3- MAINTAINER Ludovic Vannoorenberghe <ludo@datacamp.com>
4-
53RUN apt-get update && apt-get install -y python build-essential
64
75RUN npm install -g pm2 node-gyp sails grunt bower jake npm-check-updates
86
7+ ARG VERSION
8+ ENV VERSION=${VERSION}
9+
910ENV NODE_ENV production
11+
1012# use changes to package.json to force Docker not to use the cache
1113# when we change our application's nodejs dependencies:
1214ADD package.json /tmp/package.json
Original file line number Diff line number Diff line change @@ -48,11 +48,11 @@ follow these steps:
48484 . ` ALTER USER 'root' IDENTIFIED WITH mysql_native_password BY 'password'; `
49495 . ` flush privileges; `
5050
51- ## How to deploy
5251
53- - To deploy to stating (rdocumentation.datacamp-staging.com), merge to master
54- - To deploy to production, add a tag which starts with ` release- `
55- The rdocumentation app is hosted on DataCamp's infrastructure, on our AWS ECS cluster.
52+ ## Deployment
53+
54+ - Commits to master are deployed to staging
55+ - Tags that use ` vx.y.z ` are deployed to production
5656
5757## What the CI does
5858
Original file line number Diff line number Diff line change 5252 },
5353 {
5454 "containerName" : " rdoc-app-sqsd" ,
55- "containerURI" : " filipsch /sqsd:latest" ,
55+ "containerURI" : " 708371444347.dkr.ecr.us-east-1.amazonaws.com /sqsd:latest" ,
5656 "memoryReservation" : 128 ,
5757 "essential" : true ,
5858 "containerCommand" : [
You can’t perform that action at this time.
0 commit comments