-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
46 lines (42 loc) · 1.08 KB
/
.gitlab-ci.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
.aws-setup:
before_script:
- mkdir -p ~/.aws
- echo "${GITLAB_OIDC_TOKEN}" > /tmp/web_identity_token
- echo -e "[profile oidc]\nrole_arn=${ROLE_ARN}\nweb_identity_token_file=/tmp/web_identity_token" > ~/.aws/config
stages:
- build
- release
latex:
stage: build
image: registry.gitlab.com/islandoftex/images/texlive:TL2023-2024-03-10-full
parallel:
matrix:
- lang: [it, en]
script:
- pdflatex cv-${lang}.tex
- pdflatex cv-${lang}.tex
after_script:
- cat cv-${lang}.log
artifacts:
paths:
- cv-${lang}.pdf
artifact-publish:
stage: release
image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
id_tokens:
GITLAB_OIDC_TOKEN:
aud: https://gitlab.com
variables:
AWS_PROFILE: oidc
parallel:
matrix:
- lang: [it, en]
before_script:
- !reference [.aws-setup, before_script]
script:
- aws s3 cp cv-${lang}.pdf s3://${BUCKET_NAME}/${CI_COMMIT_REF_NAME}/${lang}.pdf
- aws s3 cp cv-${lang}.pdf s3://${BUCKET_NAME}/${lang}.pdf
only:
- /^(\d+\.)?(\d+\.)?(\*|\d+)$/
except:
- branches