This repository has been archived by the owner on Oct 12, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
98 lines (89 loc) · 2.46 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
kind: pipeline
name: default
type: docker
steps:
- name: Build Plugin
image: gradle:jdk8
volumes:
- name: gradle
path: /home/gradle/.gradle
commands:
- ./gradlew assemble
environment:
ORG_GRADLE_PROJECT_BUILD_VERSION: ${DRONE_TAG}
- name: Test Plugin
image: gradle:jdk8
volumes:
- name: gradle
path: /home/gradle/.gradle
commands:
- ./gradlew --stacktrace --info --parallel check
environment:
ORG_GRADLE_PROJECT_BUILD_VERSION: ${DRONE_TAG}
- name: Build Documentation
image: gradle:jdk8
volumes:
- name: gradle
path: /home/gradle/.gradle
commands:
- ./gradlew groovyDoc
environment:
ORG_GRADLE_PROJECT_BUILD_VERSION: ${DRONE_TAG}
when:
target:
- production
- name: Publish Plugin
image: gradle:jdk8
volumes:
- name: gradle
path: /home/gradle/.gradle
commands:
- ./gradlew -Dgradle.publish.key=$${GRADLE_PUBLISH_KEY} -Dgradle.publish.secret=$${GRADLE_PUBLISH_SECRET} publishPlugins
environment:
ORG_GRADLE_PROJECT_BUILD_VERSION: ${DRONE_TAG}
GRADLE_PUBLISH_KEY:
from_secret: GRADLE_PUBLISH_KEY
GRADLE_PUBLISH_SECRET:
from_secret: GRADLE_PUBLISH_SECRET
when:
target:
- production
- name: Publish Documentation
image: drone/git
commands:
- git clone --depth=1 https://$${GITHUB_USERNAME}:$${GITHUB_PUSH_TOKEN}@github.com/devsoap/docs.git build/repo/docs
- cp -R build/docs/groovydoc build/repo/docs/docs/_fn_gradle_plugin_api
- cd build/repo/docs
- git config user.email '[email protected]'
- git config user.name 'Devsoap Build Bot'
- git checkout -b fn-gradle-plugin/$${DRONE_TAG}
- git add docs/_fn_gradle_plugin_api
- git commit -m "Update API documentation for FN Gradle Plugin ${DRONE_TAG}"
- git push origin fn-gradle-plugin/$${DRONE_TAG}
environment:
GITHUB_USERNAME:
from_secret: GITHUB_USERNAME
GITHUB_PUSH_TOKEN:
from_secret: GITHUB_PUSH_TOKEN
when:
target:
- production
- name: Cleanup
image: gradle:jdk8
volumes:
- name: gradle
path: /home/gradle/.gradle
commands:
- rm -rf build
- ./gradlew clean
- ./gradlew --stop
environment:
ORG_GRADLE_PROJECT_BUILD_VERSION: ${DRONE_TAG}
trigger:
ref:
include:
- refs/tags/**
volumes:
- name: gradle
host:
path: /tmp/drone/gradle