-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwercker.yml
39 lines (38 loc) · 1.27 KB
/
wercker.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
# This references an OpenJDK container from the
# Docker Hub https://hub.docker.com/_/openjdk/
# Read more about containers on our dev center
# http://devcenter.wercker.com/docs/containers/index.html
box: openjdk:8-jdk
# This is the build pipeline. Pipelines are the core of wercker
# Read more about pipelines on our dev center
# http://devcenter.wercker.com/docs/pipelines/index.html
build:
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# http://devcenter.wercker.com/docs/steps/index.html
steps:
# https://github.com/wercker/step-gradle
- java/gradle:
task: build
version: 4.10.3
cache_project_cache: true
deploy:
steps:
- script:
name: deploy
code: |
git config --global user.email "${USER_EMAIL}"
git config --global user.name "${USER_NANE}"
git checkout -b release
./gradlew build
ls -a | grep -v -E 'build|.git$|\.\.$|\.$' | xargs rm -r
mkdir webapps
mv build/libs/ROOT.war webapps/ROOT.war
rm -r build
- script:
name: git push
code: |
git remote add deploy https://${GIT_USER}:${GIT_PASSWORD}@${GIT_URL}
git add .
git commit -m "wercker ci release"
git push deploy release --force