Skip to content
This repository was archived by the owner on Jun 17, 2020. It is now read-only.

Commit 88fa178

Browse files
authored
Add support for CircleCI integration builds
* Adding circleci support * Trying to prevent sigkills according to https://discuss.circleci.com/t/builds-getting-killed-with-vague-message-received-signal-killed/10214/12 * Remove formatting, manage memory * Max memory take 2 * Trying to build everything in one machine and one shot * Adding echoes and fixing dir names * See if parallelized builds work fine and fix geowebcache main pom location * Trying to tighten memory a bit more while preserving parallel builds * Back to sequential build * Attempt to split into smaller commands and run down to GeoServer * Some issues with directories, seem they are intepreted as relative, attempt to fix #1 * Some issues with directories, seem they are intepreted as relative, attempt to fix #2 * Some issues with directories, seem they are intepreted as relative, attempt to fix #3 * Don't update snapshots, trying to use less memory in GS build * Don't update snapshots, trying to use less memory in GT build * More memory work and starting to add repository caching * Fixing indentation * More caching fixes * Ok, trying to get offline costs too much in terms of downloads * One more attempt at getting a GS build that does not fail * Temporarily add early cache saving to have something for the next build (speed up trial and error roundtrip) * Damn you yaml * Switching all builds to batch mode * Cache was saved once, good enough, removing * Community modules have been compiled, without tests, in the first command, the third is redundant * Trying harder to release memory to the OS * Breaking install into two lines, it keeps on failing due to lack of memory... * Trying to centralize JVM configurations * Yet another attempt to control memory usage * war assembly failed in GWC due to memory, trying to give a bit more * Fixing typo * One more push on memory * Circle CI limits by the minute, try to reduce build time as much as possible
1 parent 9196da8 commit 88fa178

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: circleci/openjdk:8u212-jdk-stretch
6+
command: ["/bin/bash"]
7+
steps:
8+
- run:
9+
name: Checkout GeoTools, GeoWebCache and GeoServer
10+
command: |
11+
echo "Preparing git ssh checkouts"
12+
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
13+
echo "Checking out GeoTools"
14+
mkdir geotools
15+
git clone git@github.com:geotools/geotools.git geotools
16+
echo "Checking out GeoWebCache"
17+
mkdir geowebcache
18+
git clone git@github.com:GeoWebCache/geowebcache.git geowebcache
19+
echo "Checking out GeoServer"
20+
mkdir geoserver
21+
git clone git@github.com:geoserver/geoserver.git geoserver
22+
23+
- run:
24+
name: Generate cache key
25+
command: |
26+
find geotools geowebcache geoserver -name "pom.xml" | sort | xargs md5sum > /tmp/checksum.txt
27+
cat /tmp/checksum.txt
28+
29+
- restore_cache:
30+
key: gt_gwc_gs-{{ checksum "/tmp/checksum.txt" }}
31+
32+
- run:
33+
name: Build GeoTools (no tests, prepare fresh artifacts)
34+
command: |
35+
export TEST_OPTS="-XX:+UseStringDeduplication -XX:+UseG1GC -XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10"
36+
export MAVEN_OPTS="-Xmx256m $TEST_OPTS"
37+
mvn -B -f geotools/pom.xml install -Dall -Dfmt.skip=true -DskipTests
38+
39+
- run:
40+
name: Build GeoWebCache with tests
41+
command: |
42+
export TEST_OPTS="-XX:+UseStringDeduplication -XX:+UseG1GC -XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10"
43+
export MAVEN_OPTS="-Xmx512m $TEST_OPTS"
44+
mvn -B -f geowebcache/geowebcache/pom.xml install -nsu -Dfmt.skip=true -DskipTests
45+
mvn -B -f geowebcache/geowebcache/pom.xml test -nsu -T3 -Dfmt.skip=true
46+
47+
- run:
48+
name: Build GeoServer with tests (and community modules without)
49+
command: |
50+
export TEST_OPTS="-XX:+UseStringDeduplication -XX:+UseG1GC -XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10"
51+
export MAVEN_OPTS="-Xmx256m $TEST_OPTS"
52+
mvn -B -f geoserver/src/pom.xml install -nsu -Prelease -Dfmt.skip=true -DskipTests
53+
mvn -B -f geoserver/src/community/pom.xml install -nsu -DcommunityRelease -Dfmt.skip=true -DskipTests
54+
mvn -B -f geoserver/src/pom.xml test -T3 -nsu -Dtest.maxHeapSize=512m -Djvm.opts="$TEST_OPTS" -Prelease -Dfmt.skip=true
55+
56+
- run:
57+
name: Cleanup repository (remove snapshots)
58+
command: |
59+
rm -rf ~/.m2/repository/org/geotools
60+
rm -rf ~/.m2/repository/org/geowebcache
61+
rm -rf ~/.m2/repository/org/geoserver
62+
63+
- save_cache:
64+
key: gt_gwc_gs-{{ checksum "/tmp/checksum.txt" }}
65+
paths:
66+
- ~/.m2/repository

0 commit comments

Comments
 (0)