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 13
/
.drone.yml
153 lines (143 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Copyright 2018-2020 Devsoap Inc.
#
# Licensed under the Creative Commons Attribution-NoDerivatives 4.0
# International Public License (the "License"); you may not use this file
# except in compliance with the License.
#
# You may obtain a copy of the License at
#
# https://creativecommons.org/licenses/by-nd/4.0/
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
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}
DEVSOAP_EMAIL:
from_secret: DEVSOAP_EMAIL
DEVSOAP_KEY:
from_secret: DEVSOAP_KEY
- name: Run Basic Tests
image: gradle:jdk8
volumes:
- name: gradle
path: /home/gradle/.gradle
commands:
- ./gradlew --stacktrace --info check
environment:
ORG_GRADLE_PROJECT_BUILD_VERSION: ${DRONE_TAG}
DEVSOAP_EMAIL:
from_secret: DEVSOAP_EMAIL
DEVSOAP_KEY:
from_secret: DEVSOAP_KEY
when:
not:
target:
- production
- name: Run Functional Tests
image: gradle:jdk8
volumes:
- name: gradle
path: /home/gradle/.gradle
commands:
- apt-get update -y
- apt-get install -y build-essential
- ./gradlew --stacktrace --info --parallel functionalTest
environment:
ORG_GRADLE_PROJECT_BUILD_VERSION: ${DRONE_TAG}
DEVSOAP_EMAIL:
from_secret: DEVSOAP_EMAIL
DEVSOAP_KEY:
from_secret: DEVSOAP_KEY
when:
target:
- tests
- name: Build Documentation
image: gradle:jdk8
volumes:
- name: gradle
path: /home/gradle/.gradle
commands:
- ./gradlew groovyDoc
environment:
ORG_GRADLE_PROJECT_BUILD_VERSION: ${DRONE_TAG}
DEVSOAP_EMAIL:
from_secret: DEVSOAP_EMAIL
DEVSOAP_KEY:
from_secret: DEVSOAP_KEY
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
DEVSOAP_EMAIL:
from_secret: DEVSOAP_EMAIL
DEVSOAP_KEY:
from_secret: DEVSOAP_KEY
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/_vaadin_flow_gradle_plugin_api
- cd build/repo/docs
- git config user.email '[email protected]'
- git config user.name 'Devsoap Build Bot'
- git checkout -b vaadin-flow-gradle-plugin/$${DRONE_TAG}
- git add docs/_vaadin_flow_gradle_plugin_api
- git commit -m "Update API documentation for Vaadin Flow Gradle Plugin ${DRONE_TAG}"
- git push origin vaadin-flow-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