-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild-locally.sh
More file actions
executable file
·624 lines (517 loc) · 21.9 KB
/
Copy pathbuild-locally.sh
File metadata and controls
executable file
·624 lines (517 loc) · 21.9 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
#! /usr/bin/env bash
#
# Copyright contributors to the Galasa project
#
# SPDX-License-Identifier: EPL-2.0
#
#-----------------------------------------------------------------------------------------
#
# Objectives: Build this repository code locally.
#
#-----------------------------------------------------------------------------------------
# Where is this script executing from ?
BASEDIR=$(dirname "$0");pushd $BASEDIR 2>&1 >> /dev/null ;BASEDIR=$(pwd);popd 2>&1 >> /dev/null
export ORIGINAL_DIR=$(pwd)
cd "${BASEDIR}/.."
WORKSPACE_DIR=$(pwd)
export ISOLATED_DIR=${BASEDIR}/full
export MVP_DIR=${BASEDIR}/mvp
#-----------------------------------------------------------------------------------------
#
# Set Colors
#
#-----------------------------------------------------------------------------------------
bold=$(tput bold)
underline=$(tput sgr 0 1)
reset=$(tput sgr0)
red=$(tput setaf 1)
green=$(tput setaf 76)
white=$(tput setaf 7)
tan=$(tput setaf 202)
blue=$(tput setaf 25)
#-----------------------------------------------------------------------------------------
#
# Headers and Logging
#
#-----------------------------------------------------------------------------------------
underline() { printf "${underline}${bold}%s${reset}\n" "$@" ; }
h1() { printf "\n${underline}${bold}${blue}%s${reset}\n" "$@" ; }
h2() { printf "\n${underline}${bold}${white}%s${reset}\n" "$@" ; }
debug() { printf "${white}[.] %s${reset}\n" "$@" ; }
info() { printf "${white}[➜] %s${reset}\n" "$@" ; }
success() { printf "${white}[${green}✔${white}] ${green}%s${reset}\n" "$@" ; }
error() { printf "${white}[${red}✖${white}] ${red}%s${reset}\n" "$@" ; }
warn() { printf "${white}[${tan}➜${white}] ${tan}%s${reset}\n" "$@" ; }
bold() { printf "${bold}%s${reset}\n" "$@" ; }
note() { printf "\n${underline}${bold}${blue}Note:${reset} ${blue}%s${reset}\n" "$@" ; }
#-----------------------------------------------------------------------------------------
# Functions
#-----------------------------------------------------------------------------------------
function usage {
info "Syntax: build-locally.sh [OPTIONS]"
cat << EOF
Options are:
-h | --help : Display this help text
Environment Variables:
SOURCE_MAVEN_OBR :
Optional. Defaults to https://development.galasa.dev/main/maven-repo/obr
Used to indicate where the Galasa OBR artifacts can be found.
Can be set to the location of the local maven repository.
SOURCE_MAVEN_SIMPLATFORM :
Optional. Defaults to https://development.galasa.dev/main/maven-repo/simplatform
Used to indicate where the Galasa Simplatform artifacts can be found.
Can be set to the location of the local maven repository.
LOGS_DIR :
Optional. Defaults to creating a new temporary folder.
Controls where logs are placed.
EOF
}
function check_exit_code () {
# This function takes 3 parameters in the form:
# $1 an integer value of the returned exit code
# $2 an error message to display if $1 is not equal to 0
if [[ "$1" != "0" ]]; then
error "$2"
exit 1
fi
}
#-----------------------------------------------------------------------------------------
# Process parameters
#-----------------------------------------------------------------------------------------
while [ "$1" != "" ]; do
case $1 in
-h | --help ) usage
exit
;;
* ) error "Unexpected argument $1"
usage
exit 1
esac
shift
done
#-----------------------------------------------------------------------------------------
# Main logic.
#-----------------------------------------------------------------------------------------
MVP_DISTRIBUTION="MVP"
ISOLATED_DISTRIBUTION="Isolated"
source_dir="."
project=$(basename ${BASEDIR})
h1 "Building ${project}"
# Override these variables if you want to build from different maven repos, like your local .m2...
if [[ -z ${SOURCE_MAVEN_OBR} ]]; then
export SOURCE_MAVEN_OBR=https://development.galasa.dev/main/maven-repo/obr
info "SOURCE_MAVEN_OBR repo defaulting to ${SOURCE_MAVEN_OBR}."
info "Set this environment variable if you want to override this value."
else
info "SOURCE_MAVEN_OBR set to ${SOURCE_MAVEN_OBR} by caller."
fi
if [[ -z ${SOURCE_MAVEN_SIMPLATFORM} ]]; then
export SOURCE_MAVEN_SIMPLATFORM=https://development.galasa.dev/main/maven-repo/simplatform
info "SOURCE_MAVEN_SIMPLATFORM repo defaulting to ${SOURCE_MAVEN_SIMPLATFORM}."
info "Set this environment variable if you want to override this value."
else
info "SOURCE_MAVEN_SIMPLATFORM set to ${SOURCE_MAVEN_SIMPLATFORM} by caller."
fi
# Create a temporary dir.
# Note: This bash 'spell' works in OSX and Linux.
if [[ -z ${LOGS_DIR} ]]; then
export LOGS_DIR=$(mktemp -d 2>/dev/null || mktemp -d -t "galasa-logs")
info "Logs are stored in the ${LOGS_DIR} folder."
info "Override this setting using the LOGS_DIR environment variable."
else
mkdir -p ${LOGS_DIR} 2>&1 > /dev/null # Don't show output. We don't care if it already existed.
info "Logs are stored in the ${LOGS_DIR} folder."
info "Overridden by caller using the LOGS_DIR variable."
fi
info "Using source code at ${source_dir}"
cd ${BASEDIR}/${source_dir}
if [[ "${DEBUG}" == "1" ]]; then
OPTIONAL_DEBUG_FLAG="-debug"
else
OPTIONAL_DEBUG_FLAG="-info"
fi
log_file=${LOGS_DIR}/${project}.txt
info "Log will be placed at ${log_file}"
date > ${log_file}
#------------------------------------------------------------------------------------
function get_galasabld_binary_location {
# What's the architecture-variable name of the build tool we want for this local build ?
export ARCHITECTURE=$(uname -m) # arm64 or amd64
if [ $ARCHITECTURE == "x86_64" ]; then
export ARCHITECTURE="amd64"
fi
raw_os=$(uname -s) # eg: "Darwin"
os=""
case $raw_os in
Darwin*)
os="darwin"
;;
Windows*)
os="windows"
;;
Linux*)
os="linux"
;;
*)
error "Failed to recognise which operating system is in use. $raw_os"
exit 1
esac
export GALASA_BUILD_TOOL_NAME=galasabld-${os}-${ARCHITECTURE}
# Favour the locally built galasabld tool, else use the galasabld tool on the path, or fail if not available.
export GALASA_BUILD_TOOL_PATH=${WORKSPACE_DIR}/galasa/modules/buildutils/bin/${GALASA_BUILD_TOOL_NAME}
if [[ -e ${GALASA_BUILD_TOOL_PATH} ]]; then
info "Using the $GALASA_BUILD_TOOL_NAME tool at ${GALASA_BUILD_TOOL_PATH}"
else
GALASABLD_ON_PATH=$(which galasabld)
rc=$?
if [[ "${rc}" == "0" ]]; then
info "Using the 'galasabld' tool which is on the PATH"
GALASA_BUILD_TOOL_PATH=${GALASABLD_ON_PATH}
else
GALASABLD_ON_PATH=$(which $GALASA_BUILD_TOOL_NAME)
rc=$?
if [[ "${rc}" == "0" ]]; then
info "Using the '$GALASA_BUILD_TOOL_NAME' tool which is on the PATH"
GALASA_BUILD_TOOL_PATH=${GALASABLD_ON_PATH}
else
error "Cannot find the $GALASA_BUILD_TOOL_NAME tools on locally built workspace or the path."
info "Try re-building the buildutils module of the 'galasa' repository"
exit 1
fi
fi
fi
}
#------------------------------------------------------------------------------------
function generate_pom_xml {
export DIRECTORY=$1
export DISTRIBUTION=$2
cd ${DIRECTORY}
h2 "Generating the pom.xml from the pom.template for ${DISTRIBUTION}"
dist_flag=""
if [[ "${DISTRIBUTION}" == "${ISOLATED_DISTRIBUTION}" ]]; then
dist_flag="--isolated"
elif [[ "${DISTRIBUTION}" == "${MVP_DISTRIBUTION}" ]]; then
dist_flag="--mvp"
else
error "Programming logic error. Invalid distribution provided. Log file is ${log_file}"
exit 1
fi
info "Using galasabld tool ${GALASA_BUILD_TOOL_PATH}"
cmd="${GALASA_BUILD_TOOL_PATH} template \
--releaseMetadata ${WORKSPACE_DIR}/galasa/modules/framework/release.yaml \
--releaseMetadata ${WORKSPACE_DIR}/galasa/modules/extensions/release.yaml \
--releaseMetadata ${WORKSPACE_DIR}/galasa/modules/managers/release.yaml \
--releaseMetadata ${WORKSPACE_DIR}/galasa/modules/obr/release.yaml \
--template pom.template \
--output pom.xml \
${dist_flag}"
echo "Command is $cmd" >> ${log_file}
$cmd 2>&1 >> ${log_file}
rc=$?
if [[ "${rc}" != "0" ]]; then
error "Failed to generate a pom.xml from the pom.template. Log file is ${log_file}"
exit 1
fi
success "pom.xml generated ok - log is at ${log_file}"
}
#------------------------------------------------------------------------------------
function generate_pom_api_deps_xml {
# Scan the galasa source tree for build.gradle files that have api-scoped third-party
# dependencies and belong to the requested distribution. Write a pomApiDeps.xml into
# the target directory listing only those deps, for use with maven-dependency-plugin
# copy-dependencies to pull in their transitive JARs and parent POMs.
export DIRECTORY=$1
export DISTRIBUTION=$2
cd ${DIRECTORY}
h2 "Generating pomApiDeps.xml for ${DISTRIBUTION}"
# Determine which gradle flag corresponds to this distribution.
if [[ "${DISTRIBUTION}" == "${ISOLATED_DISTRIBUTION}" ]]; then
dist_gradle_flag="includeInIsolated"
elif [[ "${DISTRIBUTION}" == "${MVP_DISTRIBUTION}" ]]; then
dist_gradle_flag="includeInMVP"
else
error "Programming logic error. Invalid distribution provided. Log file is ${log_file}"
exit 1
fi
# Read the release version from the already-generated pom.xml.
galasa_version=$(grep -m1 '<version>' pom.xml | sed 's|.*<version>\(.*\)</version>.*|\1|' | tr -d '[:space:]')
if [[ -z "${galasa_version}" ]]; then
error "Could not read galasa version from pom.xml. Has pom.xml been generated yet?"
exit 1
fi
info "Using galasa version ${galasa_version} for pomApiDeps.xml"
# Find all individual module build.gradle files (exclude buildSrc convention plugins).
# For each file where the distribution flag is set to true, extract api-scoped
# third-party dependency lines (exclude api project(...) and dev.galasa:* non-wrapping).
api_deps=""
while IFS= read -r gradle_file; do
# Skip any file inside a buildSrc directory.
if [[ "${gradle_file}" == *"/buildSrc/"* ]]; then
continue
fi
# Check if this module is included in the target distribution.
if ! grep -q "ext\.${dist_gradle_flag}[[:space:]]*=[[:space:]]*true" "${gradle_file}"; then
continue
fi
# Extract api '<groupId>:<artifactId>' lines.
# Exclude: api project(...), api platform(...), and dev.galasa:* non-wrapping deps.
while IFS= read -r api_line; do
# Parse groupId:artifactId from the string value.
coord=$(echo "${api_line}" | sed "s/.*api[[:space:]]*'\\([^']*\\)'.*/\\1/")
group_id=$(echo "${coord}" | cut -d: -f1)
artifact_id=$(echo "${coord}" | cut -d: -f2)
# Skip dev.galasa artifacts unless they are wrapping bundles.
if [[ "${group_id}" == "dev.galasa" ]] && [[ "${artifact_id}" != dev.galasa.wrapping* ]]; then
continue
fi
api_deps="${api_deps}"$'\n'"${group_id}:${artifact_id}"
done < <(grep -E "^[[:space:]]*api[[:space:]]+'[^:]+:[^']+'[[:space:]]*$" "${gradle_file}")
done < <(find "${WORKSPACE_DIR}/galasa" -name "build.gradle" -not -path "*/buildSrc/*")
# Deduplicate.
api_deps=$(echo "${api_deps}" | sort -u | grep -v '^$')
if [[ -z "${api_deps}" ]]; then
warn "No api dependencies found for ${DISTRIBUTION} — pomApiDeps.xml will have an empty dependencies block."
fi
# Build the <dependencies> XML block.
dep_xml=""
while IFS= read -r coord; do
group_id=$(echo "${coord}" | cut -d: -f1)
artifact_id=$(echo "${coord}" | cut -d: -f2)
dep_xml="${dep_xml}
<dependency>
<groupId>${group_id}</groupId>
<artifactId>${artifact_id}</artifactId>
</dependency>"
done <<< "${api_deps}"
# Write pomApiDeps.xml.
cat > pomApiDeps.xml << EOF
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<!--
This file has been automatically generated by running the build-locally script. Do not edit this manually.
-->
<groupId>dev.galasa</groupId>
<artifactId>galasa-isolated-api-deps</artifactId>
<version>${galasa_version}</version>
<packaging>pom</packaging>
<properties>
<galasa.target.repo>file:\${project.build.directory}/repo</galasa.target.repo>
<galasa.target.repo.dir>target/isolated/maven</galasa.target.repo.dir>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>dev.galasa.platform</artifactId>
<version>${galasa_version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>${dep_xml}
</dependencies>
<build>
<plugins>
<plugin>
<groupId>dev.galasa</groupId>
<artifactId>galasastaging-maven-plugin</artifactId>
<version>0.15.0</version>
<extensions>true</extensions>
<executions>
<execution>
<id>deploy-api-deps</id>
<phase>process-sources</phase>
<goals>
<goal>deployartifacts2</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
<executions>
<execution>
<id>copy-api-dep-transitives</id>
<phase>process-sources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>\${galasa.target.repo.dir}</outputDirectory>
<useRepositoryLayout>true</useRepositoryLayout>
<copyPom>true</copyPom>
<addParentPoms>true</addParentPoms>
<includeScope>compile</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
EOF
rc=$?
if [[ "${rc}" != "0" ]]; then
error "Failed to generate pomApiDeps.xml. Log file is ${log_file}"
exit 1
fi
success "pomApiDeps.xml generated ok"
}
#------------------------------------------------------------------------------------
function build_pom_xml {
export DIRECTORY=$1
export DISTRIBUTION=$2
export POM_FILE=$3
export TARGET_DIR=$4
cd ${DIRECTORY}
h2 "Building the ${POM_FILE} for ${DISTRIBUTION}"
cmd="mvn -f ${POM_FILE} process-sources -X \
-Dgpg.skip=true \
-Dgalasa.target.repo=file:${TARGET_DIR} \
-Dgalasa.runtime.repo=${SOURCE_MAVEN_OBR} \
-Dgalasa.simplatform.repo=${SOURCE_MAVEN_SIMPLATFORM} \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
--batch-mode --errors --fail-at-end \
--settings ${BASEDIR}/settings.xml"
echo "Command is $cmd" >> ${log_file}
$cmd 2>&1 >> ${log_file}
rc=$?
if [[ "${rc}" != "0" ]]; then
error "Failed to build ${POM_FILE}. Log file is ${log_file}"
exit 1
fi
success "${POM_FILE} built ok - log is at ${log_file}"
}
#------------------------------------------------------------------------------------
function build_pom_galasactl_xml {
export DIRECTORY=$1
export DISTRIBUTION=$2
cd ${DIRECTORY}
h2 "Getting the galasactl binaries"
mkdir bin
cp ${WORKSPACE_DIR}/galasa/modules/cli/bin/galasactl* bin
h2 "Building the pomGalasactl.xml for ${DISTRIBUTION}"
cmd="mvn -f pomGalasactl.xml validate -X \
-Dgpg.skip=true \
-Dgalasa.target.repo=file:target/isolated \
-Dgalasa.runtime.repo=${SOURCE_MAVEN_OBR} \
-Dgalasa.simplatform.repo=${SOURCE_MAVEN_SIMPLATFORM} \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
--batch-mode --errors --fail-at-end \
--settings ${BASEDIR}/settings.xml"
echo "Command is $cmd" >> ${log_file}
$cmd 2>&1 >> ${log_file}
rc=$?
if [[ "${rc}" != "0" ]]; then
error "Failed to build pomGalasactl.xml. Log file is ${log_file}"
exit 1
fi
success "pomGalasactl.xml built ok - log is at ${log_file}"
}
#------------------------------------------------------------------------------------
function copy_text_files {
export DIRECTORY=$1
export DISTRIBUTION=$2
cd ${DIRECTORY}
h2 "Copy required text files into the target directory for ${DISTRIBUTION}"
cp -vr resources/* target/isolated
success "Text files copied into the target directory ok - log is at ${log_file}"
}
#------------------------------------------------------------------------------------
function build_zip {
export DIRECTORY=$1
export DISTRIBUTION=$2
cd ${DIRECTORY}
h2 "Building the pomZip.xml for ${DISTRIBUTION}"
cmd="mvn -f pomZip.xml deploy -X \
-Dgpg.skip=true \
-Dgalasa.target.repo=file:target/isolated \
-Dgalasa.release.repo=file:target/isolated \
-Dgalasa.runtime.repo=${SOURCE_MAVEN_OBR} \
-Dgalasa.simplatform.repo=${SOURCE_MAVEN_SIMPLATFORM} \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
--batch-mode --errors --fail-at-end \
--settings ${BASEDIR}/settings.xml"
echo "Command is $cmd" >> ${log_file}
$cmd 2>&1 >> ${log_file}
rc=$?
if [[ "${rc}" != "0" ]]; then
error "Failed to build pomZip.xml. Log file is ${log_file}"
exit 1
fi
success "pomZip.xml built ok - log is at ${log_file}"
}
#------------------------------------------------------------------------------------
function check_secrets {
h2 "Updating secrets baseline"
cd ${BASEDIR}
detect-secrets scan --update .secrets.baseline
rc=$?
check_exit_code $rc "Failed to run detect-secrets. Please check it is installed properly"
success "Updated secrets file"
h2 "Running audit for secrets"
detect-secrets audit .secrets.baseline
rc=$?
check_exit_code $rc "Failed to audit detect-secrets."
# Check all secrets have been audited
secrets=$(grep -c hashed_secret .secrets.baseline)
audits=$(grep -c is_secret .secrets.baseline)
if [[ "$secrets" != "$audits" ]]; then
error "Not all secrets found have been audited"
exit 1
fi
success "Secrets audit complete"
h2 "Removing the timestamp from the secrets baseline file so it doesn't always cause a git change."
mkdir -p temp
rc=$?
check_exit_code $rc "Failed to create a temporary folder"
cat .secrets.baseline | grep -v "generated_at" > temp/.secrets.baseline.temp
rc=$?
check_exit_code $rc "Failed to create a temporary file with no timestamp inside"
mv temp/.secrets.baseline.temp .secrets.baseline
rc=$?
check_exit_code $rc "Failed to overwrite the secrets baseline with one containing no timestamp inside."
success "Secrets baseline timestamp content has been removed ok"
}
rm -f ${ISOLATED_DIR}/pom.xml
rm -f ${ISOLATED_DIR}/pomApiDeps.xml
rm -rf ${ISOLATED_DIR}/target
rm -rf ${ISOLATED_DIR}/bin
rm -f ${MVP_DIR}/pom.xml
rm -f ${MVP_DIR}/pomApiDeps.xml
rm -rf ${MVP_DIR}/target
rm -rf ${MVP_DIR}/bin
# galasabld is used to create a pom.xml from a pom.template
# with information from several release.yaml files.
get_galasabld_binary_location
generate_pom_xml ${ISOLATED_DIR} ${ISOLATED_DISTRIBUTION}
generate_pom_api_deps_xml ${ISOLATED_DIR} ${ISOLATED_DISTRIBUTION}
build_pom_xml ${ISOLATED_DIR} ${ISOLATED_DISTRIBUTION} "pom.xml" "target/isolated/maven"
build_pom_xml ${ISOLATED_DIR} ${ISOLATED_DISTRIBUTION} "pomApiDeps.xml" "target/isolated/maven"
${BASEDIR}/fix-copy-dep-repo.sh ${ISOLATED_DIR}/target/isolated/maven
build_pom_xml ${ISOLATED_DIR} ${ISOLATED_DISTRIBUTION} "pom2.xml" "target/isolated/maven"
build_pom_xml ${ISOLATED_DIR} ${ISOLATED_DISTRIBUTION} "pom3.xml" "target/isolated/maven"
build_pom_galasactl_xml ${ISOLATED_DIR} ${ISOLATED_DISTRIBUTION}
copy_text_files ${ISOLATED_DIR} ${ISOLATED_DISTRIBUTION}
build_zip ${ISOLATED_DIR} ${ISOLATED_DISTRIBUTION}
success "Galasa Isolated distribution built successfully - the result can be found at ${ISOLATED_DIR}/target/isolated."
generate_pom_xml ${MVP_DIR} ${MVP_DISTRIBUTION}
generate_pom_api_deps_xml ${MVP_DIR} ${MVP_DISTRIBUTION}
build_pom_xml ${MVP_DIR} ${MVP_DISTRIBUTION} "pom.xml" "target/isolated/maven"
build_pom_xml ${MVP_DIR} ${MVP_DISTRIBUTION} "pomApiDeps.xml" "target/isolated/maven"
${BASEDIR}/fix-copy-dep-repo.sh ${MVP_DIR}/target/isolated/maven
build_pom_xml ${MVP_DIR} ${MVP_DISTRIBUTION} "pom2.xml" "target/isolated/maven"
build_pom_xml ${MVP_DIR} ${MVP_DISTRIBUTION} "pom3.xml" "target/isolated/maven"
build_pom_galasactl_xml ${MVP_DIR} ${MVP_DISTRIBUTION}
copy_text_files ${MVP_DIR} ${MVP_DISTRIBUTION}
build_zip ${MVP_DIR} ${MVP_DISTRIBUTION}
success "Galasa MVP distribution built successfully - the result can be found at ${MVP_DIR}/target/isolated."
check_secrets
success "Project ${project} built - OK - log is at ${log_file}"