-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrancher.yaml
56 lines (55 loc) · 1.65 KB
/
rancher.yaml
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
version: 2.1
description: |
Help to deploy rancher
display:
home_url: https://github.com/donkeycode/circle-orbs
source_url: https://github.com/donkeycode/circle-orbs
orbs:
utils: donkeycode/[email protected]
commands: {}
executors:
default:
description: |
Use rancher cli
docker:
- image: donkeycode/rancher-cli
jobs:
deploy:
description: |
Sample description
executor: default
parameters:
env:
default: preprod
description: The env to deploy
type: string
project_name:
description: The stack name to deploy
type: string
steps:
- utils/install_git
- run:
command: apk add openssh
- checkout
- deploy:
command: |
source ~/project/.circleci/determine_env.sh
rancher up --force-upgrade -s <<parameters.project_name>> -d --pull
sleep 30
rancher up --upgrade --confirm-upgrade -s <<parameters.project_name>> -d
name: Deploy to rancher
working_directory: ~/project/deploy/<<parameters.env>>
examples:
example:
description: |
Sample example description.
usage:
version: "2.1"
orbs:
rancher: donkeycode/[email protected]
workflows:
use-my-orb:
jobs:
- rancher/deploy:
env: preprod
project_name: my-project