Commit cec9660d authored by Alexander Diewald's avatar Alexander Diewald

Merge branch 'master' into 'master'

Add build pipeline

See merge request !3
parents 7dbb6031 9cd23eeb
Pipeline #20883 passed with stages
in 13 minutes and 16 seconds
image: git.fortiss.org:5001/diewald/maven-releng:latest
stages:
- build
- test
- deploy
variables:
# recursive should work here, but gitlab-runner does not pull the latest remote
# for submodules: https://gitlab.com/gitlab-org/gitlab-runner/issues/3011
GIT_SUBMODULE_STRATEGY: none
GIT_SUBMODULE_OPTS: "--remote --recursive --init --recommend-shallow"
MAVEN_CLI_OPTS: "--batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
MAVEN_BUILD_OPTS: "-Dbuild.tooling=true -Dbuild.af3=true -Dbuild.emf=true"
MAVEN_TEST_OPTS: "-Dbuild.tests=true"
MAVEN_BUILD_DIR: "-Duser.dir=/builds/$CI_PROJECT_PATH"
cache:
key: Default
paths:
- .m2/repository/
build:
stage: build
cache:
key: Default
before_script:
- git submodule update $GIT_SUBMODULE_OPTS
script:
- mvn $MAVEN_CLI_OPTS $MAVEN_BUILD_OPTS verify
artifacts:
untracked: true
paths:
- releng/org.fortiss.af3.update/target/repository/
- releng/org.fortiss.tooling.update/target/repository/
- products/af3/org.fortiss.af3.phoenix.product/target/products/org.fortiss.af3.phoenix.product-*.zip
test:
stage: test
dependencies:
- build
cache:
key: Default
before_script:
- git submodule update $GIT_SUBMODULE_OPTS releng/org.fortiss.af3.target
- git submodule update $GIT_SUBMODULE_OPTS tests/af3
- git submodule update $GIT_SUBMODULE_OPTS features/af3
- git submodule update $GIT_SUBMODULE_OPTS features/tooling
- xvfb.sh # Setup of a virtual display needed for bringing up eclipse
script:
- mvn $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS $MAVEN_BUILD_DIR integration-test
artifacts:
paths:
- tests/af3/org.fortiss.af3.phoenix.product.tests/target/surefire-reports/TEST-org.fortiss.af3.phoenix.product.tests.AllTests.xml
- products/af3/org.fortiss.af3.phoenix.product/target/products/org.fortiss.af3.phoenix.product-*.zip
deploy:
stage: deploy
dependencies:
- test
rules:
- if: '$BUILD_TYPE == "nightly"' # This rule will be evaluated
when: on_success
script:
- ls
artifacts:
paths:
- products/af3/org.fortiss.af3.phoenix.product/target/products/org.fortiss.af3.phoenix.product-linux.gtk.x86_64.zip
- products/af3/org.fortiss.af3.phoenix.product/target/products/org.fortiss.af3.phoenix.product-macosx.cocoa.x86_64.zip
- products/af3/org.fortiss.af3.phoenix.product/target/products/org.fortiss.af3.phoenix.product-win32.win32.x86_64.zip
......@@ -2,33 +2,41 @@
path = releng/org.fortiss.af3.target
url = https://git.fortiss.org/af3/target-definition.git
branch = master
shallow = true
[submodule "bundles/af3"]
path = bundles/af3
url = https://git.fortiss.org/af3/af3.git
branch = master
fetchRecurseSubmodules = true
shallow = true
[submodule "bundles/kernel"]
path = bundles/kernel
url = https://git.fortiss.org/af3/kernel.git
branch = master
fetchRecurseSubmodules = true
shallow = true
[submodule "tests/af3"]
path = tests/af3
url = https://git.fortiss.org/af3/af3-tests.git
branch = master
shallow = true
[submodule "features/af3"]
path = features/af3
url = https://git.fortiss.org/af3/af3-features.git
branch = master
shallow = true
[submodule "features/tooling"]
path = features/tooling
url = https://git.fortiss.org/af3/tooling-features.git
branch = master
shallow = true
[submodule "products/af3"]
path = products/af3
url = https://git.fortiss.org/af3/af3-products.git
branch = master
shallow = true
[submodule "bundles/af3-rcp"]
path = bundles/af3-rcp
url = https://git.fortiss.org/af3/af3-rcp.git
branch = master
shallow = true
FROM maven:latest
RUN apt-get update
RUN apt-get install -y libgtk-3-bin xvfb libgomp1
ENV DISPLAY=:99
ADD xvfb.sh /usr/bin/xvfb.sh
RUN chmod a+x /usr/bin/xvfb.sh
#!/bin/sh
XVFBARGS="$DISPLAY -ac -screen 0 1024x768x16 +extension RANDR"
/usr/bin/Xvfb ${XVFBARGS} &
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment