-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
125 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
image: registry.gitlab.com/josm/docker-library/openjdk-8-josmplugin:latest | ||
|
||
before_script: | ||
- export GRADLE_USER_HOME=`pwd`/.gradle | ||
|
||
cache: | ||
paths: | ||
- .gradle/wrapper | ||
- .gradle/caches | ||
|
||
|
||
############### | ||
# Build stage # | ||
############### | ||
|
||
assemble: | ||
stage: build | ||
script: | ||
- ./gradlew assemble --stacktrace | ||
artifacts: | ||
paths: | ||
- build/ | ||
|
||
assemble with java 10: | ||
stage: build | ||
image: registry.gitlab.com/josm/docker-library/openjdk-10-josmplugin:latest | ||
script: | ||
- ./gradlew assemble --stacktrace | ||
artifacts: | ||
paths: | ||
- build/ | ||
|
||
|
||
############## | ||
# Test stage # | ||
############## | ||
|
||
build: | ||
stage: test | ||
script: | ||
- ./gradlew build generatePot --stacktrace | ||
artifacts: | ||
paths: | ||
- build | ||
dependencies: | ||
- assemble | ||
|
||
compile against min JOSM: | ||
stage: test | ||
script: | ||
- ./gradlew compileJava_minJosm --stacktrace | ||
dependencies: | ||
- assemble | ||
|
||
compile against latest JOSM: | ||
stage: test | ||
script: | ||
- ./gradlew compileJava_latestJosm --stacktrace | ||
dependencies: | ||
- assemble | ||
|
||
build with java 10: | ||
stage: test | ||
image: registry.gitlab.com/josm/docker-library/openjdk-10-josmplugin:latest | ||
script: | ||
- ./gradlew build --stacktrace | ||
dependencies: | ||
- assemble with java 10 | ||
|
||
|
||
################ | ||
# Deploy stage # | ||
################ | ||
|
||
upload to transifex: | ||
image: registry.gitlab.com/josm/docker-library/python-transifex:latest | ||
stage: deploy | ||
environment: | ||
name: transifex | ||
url: https://www.transifex.com/josm/josm/josm-plugin_Mapillary/ | ||
script: | ||
- TX_TOKEN="$TRANSIFEX_TOKEN" tx push -s --no-interactive | ||
dependencies: | ||
- build | ||
only: | ||
refs: | ||
- master@JOSM/Mapillary | ||
variables: | ||
- $TRANSIFEX_TOKEN | ||
|
||
release: | ||
stage: deploy | ||
environment: | ||
name: pages branch / dist directory | ||
url: https://gitlab.com/JOSM/Mapillary/tree/pages/dist | ||
script: | ||
- | | ||
echo "$SSH_PRIVATE_DEPLOY_KEY" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
git clone --depth 1 --branch pages git@gitlab.com:JOSM/Mapillary.git pages | ||
- | | ||
version=`git describe --always --dirty` | ||
longVersion=`git describe --always --long --dirty` | ||
commitMessage="Release version $longVersion" | ||
- | | ||
mkdir -pv "pages/dist/$version" | ||
cp -v build/dist/* build/tmp/jar/MANIFEST.MF "pages/dist/$version" | ||
rm -fv "pages/dist/latest" | ||
ln -s "./$version" "pages/dist/latest" | ||
- | | ||
cd pages/ | ||
git config user.name "GitLab CI for JOSM/Mapillary" | ||
git config user.email "incoming+JOSM/Mapillary@incoming.gitlab.com" | ||
git stage . | ||
git commit -a -m "$commitMessage" | ||
git push origin pages | ||
dependencies: | ||
- build | ||
only: | ||
refs: | ||
- tags@JOSM/Mapillary | ||
variables: | ||
- $SSH_PRIVATE_DEPLOY_KEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters