forked from ovotech/circleci-orbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorb.yml
64 lines (61 loc) · 1.87 KB
/
orb.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
56
57
58
59
60
61
62
63
64
version: 2.1
description: "Defines jobs for interacting with an ArgoCD instance"
executors:
python:
docker:
- image: circleci/python:3.9
commands:
wait_for_sync:
description: "Optionally sends a sync request and then waits for the Argo application to become in sync with a target revision. Expects ARGOCD_TOKEN environment variable to be set."
parameters:
wait_for:
type: integer
default: 600
description: "Maximum time to wait for sync in seconds. Default 600."
application:
type: string
description: "Application ID"
argocd_url:
type: string
description: "URL of ArgoCD server"
target:
type: string
description: "Commit hash to check for"
sync_request:
type: boolean
default: false
description: "whether to send a sync request before polling"
steps:
- run:
name: "Wait for ArgoCD to sync"
shell: /bin/bash -eo pipefail
command: |
include ./scripts/wait_for_sync.sh
jobs:
wait_for_sync:
executor: python
parameters:
wait_for:
type: integer
default: 600
description: "Maximum time to wait for in seconds. Default 600."
application:
type: string
description: "Application ID"
argocd_url:
type: string
description: "URL of ArgoCD server"
target:
type: string
description: "Commit hash to check for"
sync_request:
type: boolean
default: false
description: "whether to send a sync request before polling"
steps:
- wait_for_sync:
wait_for: << parameters.wait_for >>
argocd_url: << parameters.argocd_url >>
application: << parameters.application >>
target: << parameters.target >>
sync_request: << parameters.sync_request >>