Skip to content
Snippets Groups Projects
Commit 05cf8d56 authored by René Schöne's avatar René Schöne
Browse files

Update build process to dev/master split

- run build+test on every branch
- publish with pipeline-iid only in dev
- publish normally only in master
- make pages only in master
parent 45b09e3f
No related branches found
No related tags found
1 merge request!60.3.6
Pipeline #12720 passed
...@@ -12,20 +12,35 @@ build: ...@@ -12,20 +12,35 @@ build:
before_script: before_script:
- ls -lah * - ls -lah *
script: script:
- ./gradlew assemble - "./gradlew assemble"
test: test:
image: openjdk:11 image: openjdk:11
stage: test stage: test
needs:
- build
script: script:
- ./gradlew test - "./gradlew test"
artifacts: artifacts:
reports: reports:
junit: relast2uml.tests/build/test-results/test/TEST-*.xml junit: "*/build/test-results/test/TEST-*.xml"
publish: publish_dev:
image: openjdk:11 image: openjdk:11
stage: publish stage: publish
needs:
- test
script:
- "./gradlew setDevVersionForCI"
- "./gradlew publish"
only:
- dev
publish_master:
image: openjdk:11
stage: publish
needs:
- test
script: script:
- "./gradlew publish" - "./gradlew publish"
only: only:
...@@ -34,11 +49,13 @@ publish: ...@@ -34,11 +49,13 @@ publish:
pages: pages:
image: python:3.7-alpine image: python:3.7-alpine
stage: publish stage: publish
needs:
- test
script: script:
- pip install -U sphinx sphinx-rtd-theme recommonmark sphinxemoji sphinx-markdown-tables - "pip install -U sphinx sphinx-rtd-theme recommonmark sphinxemoji sphinx-markdown-tables"
- sphinx-build -b html pages/ public - "sphinx-build -b html pages/ public"
artifacts: artifacts:
paths: paths:
- public - public
only: only:
- master - master
...@@ -46,6 +46,14 @@ task newVersion() { ...@@ -46,6 +46,14 @@ task newVersion() {
} }
} }
task setDevVersionForCI() {
doFirst {
def props = new Properties()
props['version'] = version + "-$System.env.CI_PIPELINE_IID"
props.store(file(versionFile).newWriter(), null)
}
}
//679 //679
publishing { publishing {
publications { publications {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment