-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
41 lines (39 loc) · 1.35 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
#
# This sample yaml configuration file contains two stages and three jobs.
# This configuration uses GitLab's `only`, `when`, and `except` configuration
# options to create a pipeline that will create the `pulumi-preview` job in the pipeline,
# for all branches except the master.
# Only for master branch merges, the main `pulumi` job is executed automatically.
image:
name: pulumi/pulumi:3.137.0
entrypoint:
- '/usr/bin/env'
- 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
stages:
- build
- infrastructure-update
pulumi:
stage: infrastructure-update
script:
- npm ci
- pulumi stack select bjoern_urban_5/pulumi-infra/dev
- pulumi update --skip-preview
# Create an artifact archive with just the pulumi log file,
# which is created using console-redirection in run-pulumi.sh.
artifacts:
paths:
- pulumi-log.txt
# This is just a sample of how artifacts can be expired (removed) automatically in GitLab.
# You may choose to not set this at all based on your organization's or team's preference.
expire_in: 1 week
# This job should only be created if the pipeline is created for the master branch.
only:
- master
pulumi-preview:
stage: infrastructure-update
script:
- npm ci
- pulumi stack select bjoern_urban_5/pulumi-infra/dev
- pulumi preview
only:
- merge_requests