forked from expload/pravda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
123 lines (123 loc) · 4.08 KB
/
.drone.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
clone:
clone:
image: plugins/git
tags: true
workspace:
base: /workdir
path: code
pipeline:
tag-the-image:
image: alpine/git:1.0.4
pull: false
commands:
- echo -n `git describe --tags | sed -e "s/^v//"`",latest" > .tags
tests:
image: gcr.io/time-coin/sbt:latest
pull: true
volumes:
- /var/lib/sbt-cache:/workdir/sbt
- /var/lib/coursier-cache:/workdir/coursier
commands:
- export COURSIER_CACHE='/workdir/coursier/'
- export SBT_OPTS='-Dsbt.global.base=/workdir/sbt/ -Dsbt.ivy.home=/workdir/ivy/ -Divy.home=/workdir/ivy/'
- cd /workdir/code && sbt $SBT_OPTS -mem 2048 headerCheck scalafmtCheck test:scalafmtCheck test "gen-doc/run --check"
package-zip:
image: gcr.io/time-coin/sbt:latest
volumes:
- /var/lib/sbt-cache:/workdir/sbt
- /var/lib/coursier-cache:/workdir/coursier
commands:
- export COURSIER_CACHE='/workdir/coursier/'
- export SBT_OPTS='-Dsbt.global.base=/workdir/sbt/ -Dsbt.ivy.home=/workdir/ivy/ -Divy.home=/workdir/ivy/'
- cd /workdir/code && sbt $SBT_OPTS -mem 2048 cli/universal:packageZipTarball cli/universal:stage broadcaster/universal:stage faucet/universal:stage
when:
event: tag
package-msi:
image: gcr.io/time-coin/wix-builder:0.2
environment:
- PRAVDA_VERSION=${DRONE_TAG}
commands:
- cp -rf /workdir/code/cli/target/universal/stage /workdir/code/win-installer/
- cd /workdir/code/win-installer && bash build.sh
- mv /workdir/code/cli/target/universal/*.tgz /workdir/code/cli/target/universal/PravdaSDK-$$PRAVDA_VERSION.tgz
when:
event: tag
sign-msi:
image: byrnedo/alpine-curl
commands:
- find . -name *.msi -exec curl -F msi=@{} http://35.246.239.138:8080/sign-msi -o {} \;
when:
event: tag
publish-to-bintray:
group: publish
image: gcr.io/time-coin/sbt:latest
volumes:
- /var/lib/sbt-cache:/workdir/sbt
- /var/lib/coursier-cache:/workdir/coursier
commands:
- export COURSIER_CACHE='/workdir/coursier/'
- export SBT_OPTS='-Dsbt.global.base=/workdir/sbt/ -Dsbt.ivy.home=/workdir/ivy/ -Divy.home=/workdir/ivy/'
- cd /workdir/code && sbt $SBT_OPTS -mem 2048 publish
secrets: [ bintray_user, bintray_pass ]
when:
event: tag
publish-github-releases:
group: publish
image: plugins/github-release
files:
- /workdir/code/win-installer/*.msi
- /workdir/code/cli/target/universal/*.tgz
secrets: [ GITHUB_RELEASE_API_KEY ]
when:
event: tag
publish-docker-hub:
group: publish
image: plugins/docker
repo: expload/pravda
context: .
dockerfile: docker/images/pravda-cli/Dockerfile
secrets: [ docker_username, docker_password ]
when:
event: tag
publish-pravda-faucet:
group: publish
image: plugins/docker
repo: expload/pravda-faucet
context: .
dockerfile: docker/images/pravda-faucet/Dockerfile
secrets: [ docker_username, docker_password ]
when:
event: tag
publish-broadcaster-to-docker:
group: publish
image: plugins/docker
repo: expload/pravda-broadcaster
context: .
dockerfile: docker/images/broadcaster/Dockerfile
secrets: [ docker_username, docker_password ]
when:
event: tag
publish-pravda-dll-nuget:
group: dotnet
image: microsoft/dotnet:2.2-sdk
environment:
- PRAVDA_VERSION=${DRONE_TAG##v}
commands:
- cd /workdir/code/PravdaDotNet
- dotnet pack -c Release
- dotnet nuget push bin/Release/Expload.Pravda.$PRAVDA_VERSION.nupkg -k $NUGET_KEY -s https://api.nuget.org/v3/index.json
secrets: [ nuget_key ]
when:
event: tag
publish-pravda-program-template-nuget:
group: dotnet
image: chicker/nuget:0.8
environment:
- PRAVDA_VERSION=${DRONE_TAG##v}
commands:
- cd /workdir/code/PravdaProgramTemplate
- nuget pack -Version $PRAVDA_VERSION Expload.PravdaProgramTemplate.nuspec
- dotnet nuget push Expload.PravdaProgramTemplate.$PRAVDA_VERSION.nupkg -k $NUGET_KEY -s https://api.nuget.org/v3/index.json
secrets: [ nuget_key ]
when:
event: tag