-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircleci-example.yml
55 lines (54 loc) · 1.54 KB
/
circleci-example.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
---
# Example of cirleci deployment script with go-suitesync
version: 2
defaults: &defaults
docker:
- image: circleci/openjdk:8-jdk-browsers
environment:
# these are used to download the release - must not be changed
RELEASE: 0.0.3
REPO_OWNER: jroehl
REPO: go-suitesync
EXECUTABLE: suitesync
DOWNLOAD_RELEASE: https://raw.githubusercontent.com/jroehl/go-suitesync/master/ci/download-release.sh
SET_ENV: https://raw.githubusercontent.com/jroehl/go-suitesync/master/ci/set-env.sh
jobs:
init:
<<: *defaults
steps:
# download the go-suitesync release
- run: curl -sL ${DOWNLOAD_RELEASE} | bash
# initialize suitesync
- run: .suitesync/suitesync -v init
- persist_to_workspace:
root: .
paths:
- .suitesync
deploy:
<<: *defaults
steps:
# get github repo content
- checkout
- attach_workspace:
at: .
# set the environment variables NSCONF_ACCOUNT is set to branchname_NSCONF_ACCOUNT if it exists etc.
- run: curl -sL ${SET_ENV} | bash
- run: echo "Deploying to account \"${NSCONF_ACCOUNT}\""
# sync directories
- run: .suitesync/suitesync -v sync ${RELATIVE_SRC} ${ABSOLUTE_DST}
workflows:
version: 2
main_workflow:
jobs:
- init:
filters:
branches:
only:
- master
- deploy:
requires:
- init
filters:
branches:
only:
- master