-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathshippable.yml
More file actions
62 lines (53 loc) · 1.64 KB
/
shippable.yml
File metadata and controls
62 lines (53 loc) · 1.64 KB
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
58
59
60
61
62
language: java
jdk:
- oraclejdk8
integrations:
generic:
- integrationName: drship_nexus
env:
global:
- group_id="com.demo"
- artifact_id="helloworld"
- artifact_version="0.0.1-SNAPSHOT"
- artifact_extension="war"
- artifact_repo="repository/maven-snapshots"
- ship_test_res_loc="shippable/testresults"
build:
ci:
- export nexus_url="http://${NEXUS_HOST}"
- export repository_url=$nexus_url"/"$artifact_repo
- |
mkdir -p $ship_test_res_loc
mkdir -p ~/.m2
- shipctl replace temp/settings.xml pom.xml
- cp temp/settings.xml ~/.m2/.
- mvn -q -B clean install deploy
- ls -al $SHIPPABLE_BUILD_DIR/target
# OPTIONAL: if you want to use custom Docker Build Image and also store information in a params
# resource to be used in downstream Assembly Lines
pre_ci:
- export IMG_TAG=$(shipctl get_resource_version_key build_custom_ci_img_dh "versionName")
pre_ci_boot:
image_name: devopsrecipes/build_custom_ci
image_tag: $IMG_TAG
pull: true
on_success:
- shipctl put_resource_state_multi war_loc "versionName=$artifact_version" "artifact_version=$artifact_version" "group_id=$group_id" "artifact_id=$artifact_id"
- shipctl put_resource_state_multi war_loc "artifact_extension=$artifact_extension" "repository_url=$repository_url" "build_nbr=$BUILD_NUMBER"
resources:
- name: war_loc
type: params
versionTemplate:
params:
seed: true
jobs:
- name: java_web_app_runCI
type: runCI
dependencyMode: strict
triggerMode: parallel
steps:
- IN: build_custom_ci_img_dh
- IN: gcp_nexus_info
- OUT: war_loc
flags:
- war