File tree Expand file tree Collapse file tree 2 files changed +45
-27
lines changed Expand file tree Collapse file tree 2 files changed +45
-27
lines changed Original file line number Diff line number Diff line change 2
2
version : 2.1
3
3
# Use a package of configuration called an orb.
4
4
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
+
7
28
# Orchestrate or schedule a set of jobs
8
29
workflows :
9
- # Name the workflow "welcome"
10
- welcome :
11
- # Run the welcome/run job in its own container
30
+ deploy-dev :
12
31
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
Original file line number Diff line number Diff line change @@ -50,25 +50,5 @@ pipeline {
50
50
}
51
51
}
52
52
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
- }
73
53
}
74
- }
54
+ }
You can’t perform that action at this time.
0 commit comments