forked from zrrobbins/mbknor-jackson-jsonSchema
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.blazar.yaml
57 lines (49 loc) · 2.14 KB
/
.blazar.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
buildpack:
name: Blazar-Buildpack-Java-prebuilt
buildResources:
memoryMb: 4096
env:
PROJECT_NAME: "mbknor-jackson-jsonschema"
PUBLISH_DIR_WITHOUT_VERSION: "${PROJECT_NAME}_2.12"
SBT_TAR_VERSION: "1.3.8"
SBT_TAR_FILE_NAME: "sbt-$SBT_TAR_VERSION.tgz"
SBT_TAR_LINK: "https://github.com/sbt/sbt/releases/download/v$SBT_TAR_VERSION/$SBT_TAR_FILE_NAME"
SBT_FILE: "/tmp/sbt-install/$SBT_TAR_FILE_NAME"
HOME_BIN: "$HOME/bin"
SBT_BIN: "${HOME_BIN}/sbt/bin"
PROJECT_VERSION: ""
PUBLISH_DIR: ""
stepActivation:
uploadAndNotify:
branches: ['hubspot']
before:
- description: "Download and install sbt"
commands:
- mkdir -p /tmp/sbt-install
- mkdir -p $HOME_BIN
- wget --quiet $SBT_TAR_LINK -O $SBT_FILE
- tar -xvzf $SBT_FILE -C $HOME_BIN
- printf '#!/bin/bash \nSBT_OPTS="-Xms512M -Xmx1024M -Xss2M -XX:MaxMetaspaceSize=1024M -XX:+CMSClassUnloadingEnabled" \njava $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@"' > $SBT_BIN/sbt
- chmod u+x $SBT_BIN/sbt
- rm -rf /tmp/sbt-install
- description: "Test across all supported Scala Versions"
commands:
- $SBT_BIN/sbt +test
- description: "Package + Publish Local"
commands:
- $SBT_BIN/sbt publish
- description: "Move artifacts to upload directory"
commands:
- write-build-env-var PROJECT_VERSION $($SBT_BIN/sbt -warn 'print version')
- write-build-env-var PUBLISH_DIR "$PUBLISH_DIR_WITHOUT_VERSION-$(echo $PROJECT_VERSION | sed -n 's/^\([[:digit:]]*\.[[:digit:]]*\)-.*$/\1/p')"
- mkdir $PUBLISH_DIR
- find target/scala-2.12 -maxdepth 1 -type f | xargs -I {} cp {} $PUBLISH_DIR
- mv $PUBLISH_DIR/"$PROJECT_NAME"_2.12-"$PROJECT_VERSION".pom $PUBLISH_DIR/pom.xml
- mv $PUBLISH_DIR/"$PROJECT_NAME"_2.12-"$PROJECT_VERSION".jar $PUBLISH_DIR/main.jar
- mv $PUBLISH_DIR/"$PROJECT_NAME"_2.12-"$PROJECT_VERSION"-sources.jar $PUBLISH_DIR/sources.jar
- mv $PUBLISH_DIR/"$PROJECT_NAME"_2.12-"$PROJECT_VERSION"-javadoc.jar $PUBLISH_DIR/javadoc.jar
- name: uploadAndNotify
description: "Notifying deploy service"
activeByDefault: false
commands:
- command: publish-build-success --project