-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.yml
93 lines (90 loc) · 2.07 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: 2.1
orbs:
ruby: circleci/[email protected]
kubernetes: circleci/[email protected]
aws-cli: circleci/[email protected]
aws-ecr: circleci/[email protected]
jobs:
build:
docker:
- image: 'cimg/ruby:3.2.2-node'
steps:
- checkout
- ruby/install-deps
- run:
name: npm install
command: npm install
- run:
name: build site
command: bundle exec middleman build --verbose
- persist_to_workspace:
root: .
paths:
- build
lint:
docker:
- image: 'cimg/ruby:3.2.2-node'
steps:
- checkout
- ruby/install-deps
- attach_workspace:
at: .
- run:
name: htmlproofer checks
command: bundle exec htmlproofer --ignore-urls "/mcmw.abilitynet.org.uk/" build
build_and_push_staging:
docker:
- image: 'cimg/base:current'
steps:
- checkout
- aws-cli/setup:
role_arn: $ECR_ROLE_TO_ASSUME_STAGING
region: $ECR_REGION_STAGING
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: .
- run:
name: Build and Push
command: bash scripts/build_and_push.sh
build_and_push_prod:
docker:
- image: 'cimg/base:current'
steps:
- checkout
- aws-cli/setup:
role_arn: $ECR_ROLE_TO_ASSUME_PROD
region: $ECR_REGION_PROD
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: .
- run:
name: Build and Push
command: bash scripts/build_and_push.sh
workflows:
version: 2
build_and_test:
jobs:
- build
- lint:
requires:
- build
filters:
branches:
ignore:
- main
- build_and_push_staging:
requires:
- lint
filters:
branches:
ignore:
- main
- build_and_push_prod:
requires:
- build
filters:
branches:
only:
- main