-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
55 lines (51 loc) · 1.5 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
47
48
49
50
51
52
53
54
55
stages:
- sandbox
.salesforce-container:
image: ubuntu:latest
before_script:
- apt-get update
- apt-get install -y python3-venv python3 ca-certificates curl gnupg
- curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
- apt-get install -y nodejs
- npm install --global @salesforce/cli@latest
- sf version --verbose --json
- python3 -m venv "venv"
- source venv/bin/activate
- pip install --upgrade pip
- pip install simple-salesforce
createAndRefreshSandbox:
extends: .salesforce-container
stage: sandbox
rules:
- if: $CI_PIPELINE_SOURCE == 'web' && $SANDBOX && $LICENSE
when: always
- when: never
allow_failure: false
script:
- python ./scripts/python/create_sandbox.py --sandbox "$SANDBOX" --license "$LICENSE" --class "$CLASS" --group "$GROUP" --url $PRODUCTION_AUTH_URL
tags:
- aws,prd,us-west-2
querySandbox:
extends: .salesforce-container
stage: sandbox
rules:
- if: $CI_PIPELINE_SOURCE == 'web' && $SANDBOX
when: manual
- when: never
allow_failure: false
script:
- python ./scripts/python/query_sandbox.py --sandbox "$SANDBOX" --url $PRODUCTION_AUTH_URL
tags:
- aws,prd,us-west-2
deleteSandbox:
extends: .salesforce-container
stage: sandbox
rules:
- if: $CI_PIPELINE_SOURCE == 'web' && $SANDBOX
when: manual
- when: never
allow_failure: false
script:
- python ./scripts/python/delete_sandbox.py --sandbox "$SANDBOX" --url $PRODUCTION_AUTH_URL
tags:
- aws,prd,us-west-2