-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreference_gitlab-ci.yml
More file actions
40 lines (38 loc) · 924 Bytes
/
reference_gitlab-ci.yml
File metadata and controls
40 lines (38 loc) · 924 Bytes
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
stages:
- build
- deploy
build:
stage: build
image: cimg/openjdk:17.0-node
variables:
AWS_CREDS_TARGET_ROLE: arn:aws:iam::111122223333:role/GitLabCDK
AWS_DEFAULT_REGION: us-east-1
before_script:
- cd lib
- npm install
script:
- npm run build
- npx cdk synth
artifacts:
paths:
- $CI_PROJECT_DIR
exclude:
- $CI_PROJECT_DIR/lib/node_modules/**/*
- $CI_PROJECT_DIR/.git/**/*
when: always
rules:
- if: '$CI_COMMIT_REF_NAME == "main"'
when: always
deploy:
stage: deploy
image:
name: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
variables:
AWS_CREDS_TARGET_ROLE: arn:aws:iam::111122223333:role/GitLabCDK
AWS_DEFAULT_REGION: us-east-1
script:
- zip -r bopsparallelization.zip .
- aws s3 cp . s3://bops-parallelization/cdk --recursive
rules:
- if: '$CI_COMMIT_REF_NAME == "main"'
when: always