-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
56 lines (46 loc) · 2.62 KB
/
appveyor.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
environment:
matrix:
# For Python versions available on Appveyor, see
# http://www.appveyor.com/docs/installed-software#python
- PYTHON: "C:\\Python36-x64"
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
init:
# exit if secure variables are unset (saves time if fired by a non-team pull request)
- ps: if ($env:GH_SSH_PRIVATE_KEY -eq $null) { exit }
- git config --global user.name oll-bot
- git config --global user.email developers@openlawlib.org
install:
# the only way we can use the deploy key is by putting it in an environment variable (see above)
# and then using PowerShell (ps) to copy the environment variable into a file (see below)
# begin/end key lines should be in the environment variable
- ps: $key = "-----BEGIN RSA PRIVATE KEY-----`n"
- ps: $key += $env:GH_SSH_PRIVATE_KEY.Replace(" ", "`n")
- ps: $key += "`n-----END RSA PRIVATE KEY-----`n"
- ps: Set-Content c:\users\appveyor\.ssh\id_rsa $key
- ps: $fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
- ps: $fileContent += $env:snapshot_key.Replace(" ", "`n")
- ps: $fileContent += "`n-----END RSA PRIVATE KEY-----`n"
- ps: Set-Content c:\users\appveyor\snapshot $fileContent
- ps: $fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
- ps: $fileContent += $env:timestamp_key.Replace(" ", "`n")
- ps: $fileContent += "`n-----END RSA PRIVATE KEY-----`n"
- ps: Set-Content c:\users\appveyor\timestamp $fileContent
- set DEFAULT_PARTNER=OLL_PARTNERS_NG_PLATEAU_JUSTICE oll.partners.ng.plateau.justice
before_build:
- ps: Copy-Item $env:APPVEYOR_BUILD_FOLDER '..\plateaustate\law-xml' -Recurse
- git clone git@github.com:plateaustate/law-xml-codified.git ..\plateaustate\law-xml-codified
- git clone git@github.com:plateaustate/law-html.git ..\plateaustate\law-html
- git clone --depth 1 git@github.com:plateaustate/law-xml-codified-preview.git ..\plateaustate\law-xml-codified-preview
- git clone --depth 1 git@github.com:plateaustate/law-html-preview.git ..\plateaustate\law-html-preview
- git clone git@github.com:plateaustate/law.git ..\law
# install versioned resources (if and only if the build is a tag or cron build)
- "%PYTHON%\\python.exe -m pip -q install -r requirements.txt"
# print out the git commits for each repo
- git -C ..\plateaustate\law-xml-codified rev-parse HEAD
- git -C ..\plateaustate\law-html rev-parse HEAD
build_script:
- ps: $env:FLAG = if ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null) { "--deploy" }
- "%PYTHON%\\python.exe -m oll.tools.cli ci build_preview --root-dir .. --auth ../law %FLAG%"
test_script:
- echo Skipping doomed test discovery to save time