Skip to content

Commit 04c3483

Browse files
authored
Merge pull request #348 from department-of-veterans-affairs/circleci-deploy
Circleci deploy
2 parents e6b7f40 + e3c914b commit 04c3483

File tree

2 files changed

+45
-27
lines changed

2 files changed

+45
-27
lines changed

.circleci/config.yml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,50 @@
22
version: 2.1
33
# Use a package of configuration called an orb.
44
orbs:
5-
# Declare a dependency on the welcome-orb
6-
welcome: circleci/[email protected]
5+
aws-cli: circleci/[email protected]
6+
7+
jobs:
8+
build-deploy:
9+
docker:
10+
- image: cimg/ruby:2.7.2-node
11+
environment:
12+
AWS_DEFAULT_REGION: us-gov-west-1
13+
parameters:
14+
bucket:
15+
type: string
16+
17+
steps:
18+
- checkout
19+
- aws-cli/setup
20+
- run: yarn install
21+
# If this works, think about adding it to the Gemfile
22+
- run: gem install bundler:1.16.6
23+
- run: bundle install
24+
- run: yarn build
25+
- run: bundle exec jekyll build
26+
- run: aws s3 sync _site s3://<< parameters.bucket >> --acl public-read
27+
728
# Orchestrate or schedule a set of jobs
829
workflows:
9-
# Name the workflow "welcome"
10-
welcome:
11-
# Run the welcome/run job in its own container
30+
deploy-dev:
1231
jobs:
13-
- welcome/run
32+
- build-deploy:
33+
# Set the bucket parameter to be the dev bucket
34+
bucket: "dev-design.va.gov"
35+
filters:
36+
branches:
37+
only: master
38+
context:
39+
# The Platform context has the environment variables for setting up the aws cli
40+
- Platform
41+
deploy-staging:
42+
jobs:
43+
- build-deploy:
44+
# Set the bucket parameter to be the staging bucket
45+
bucket: "staging-design.va.gov"
46+
filters:
47+
branches:
48+
only: master
49+
context:
50+
# The Platform context has the environment variables for setting up the aws cli
51+
- Platform

Jenkinsfile

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,5 @@ pipeline {
5050
}
5151
}
5252

53-
stage('Deploy dev & staging') {
54-
when {
55-
expression { env.BRANCH_NAME == 'master' }
56-
}
57-
steps {
58-
script {
59-
commit = sh(returnStdout: true, script: "git rev-parse HEAD").trim()
60-
}
61-
62-
build job: 'deploys/vets-design-system-documentation-vagov-dev', parameters: [
63-
booleanParam(name: 'notify_slack', value: true),
64-
stringParam(name: 'ref', value: commit)
65-
], wait: false
66-
67-
build job: 'deploys/vets-design-system-documentation-vagov-staging', parameters: [
68-
booleanParam(name: 'notify_slack', value: true),
69-
stringParam(name: 'ref', value: commit)
70-
], wait: false
71-
}
72-
}
7353
}
74-
}
54+
}

0 commit comments

Comments
 (0)