Re-enable fatjars build job

This commit is contained in:
BoykoAlex
2020-07-21 14:17:14 -04:00
parent 78d5eb084f
commit 3207ec261e
3 changed files with 50 additions and 1 deletions

View File

@@ -916,7 +916,7 @@ jobs:
trigger: true
- get: maven-cache
- task: build-fatjars
file: sts4/concourse/tasks/atom-language-servers-test.yml
file: sts4/concourse/tasks/fatjars-language-servers.yml
attempts: 3
on_failure:
put: slack-notification

View File

@@ -0,0 +1,36 @@
#!/bin/bash
set -e
set -v
workdir=`pwd`
sources=$workdir/sts4/headless-services
output=$workdir/out
maven_out=$workdir/maven-out
if [ -d "maven-cache" ]; then
echo "Prepopulating maven cache"
tar xzf maven-cache/*.tar.gz -C ${HOME}
else
echo "!!!No stored maven cache found!!! "
echo "!!!This may slow down the build!!!"
fi
cd ${sources}
xvfb-run ./mvnw clean install -DargLine="-Dlsp.completions.indentation.enable=true -Dlsp.yaml.completions.errors.disable=true"
# Copy fatjars to `out` directory
timestamp=`date -u +%Y%m%d%H%M`
for i in `ls *-language-server/target/*-exec.jar`; do
basename=$(basename $i)
cp $i $output/${basename/SNAPSHOT/$timestamp}
done
ls -la $output
# Copy installed artefacts from local maven cache to `maven-out`
mkdir -p ${maven_out}/org/springframework
cp -R ~/.m2/repository/org/springframework/ide ${maven_out}/org/springframework
timestamp=`date +%s`
tarfile=${output}/headless-maven-out-${timestamp}.tar.gz
tar -czvf ${tarfile} -C ${maven_out} .

View File

@@ -0,0 +1,13 @@
inputs:
- name: sts4
- name: maven-cache
outputs:
- name: out
- name: maven-out
platform: linux
image_resource:
type: docker-image
source:
repository: kdvolder/sts4-build-env
run:
path: sts4/concourse/tasks/fatjars-language-servers.sh