This repository has been archived by the owner on Jul 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Pivotal-Field-Engineering/master
Merge latest from Pivotal-Field-Engineering
- Loading branch information
Showing
20 changed files
with
529 additions
and
231 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,64 @@ | ||
#!/bin/sh | ||
|
||
# Set the basedir for Maven wrapper script to find the .mvn folder | ||
export MAVEN_BASEDIR=pcfdemo | ||
inputDir= outputDir= versionFile= artifactId= packaging= | ||
|
||
pcfdemo/mvnw --file=pcfdemo/pom.xml clean package | ||
while [ $# -gt 0 ]; do | ||
case $1 in | ||
-i | --input-dir ) | ||
inputDir=$2 | ||
shift | ||
;; | ||
-o | --output-dir ) | ||
outputDir=$2 | ||
shift | ||
;; | ||
-v | --version-file ) | ||
versionFile=$2 | ||
shift | ||
;; | ||
-a | --artifactId ) | ||
artifactId=$2 | ||
shift | ||
;; | ||
-p | --packaging ) | ||
packaging=$2 | ||
shift | ||
;; | ||
* ) | ||
echo "Unrecognized option: $1" 1>&2 | ||
exit 1 | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
error_and_exit() { | ||
echo $1 >&2 | ||
exit 1 | ||
} | ||
|
||
if [ ! -d "$inputDir" ]; then | ||
error_and_exit "missing input directory: $inputDir" | ||
fi | ||
if [ ! -d "$outputDir" ]; then | ||
error_and_exit "missing output directory: $outputDir" | ||
fi | ||
if [ ! -f "$versionFile" ]; then | ||
error_and_exit "missing version file: $versionFile" | ||
fi | ||
if [ -z "$artifactId" ]; then | ||
error_and_exit "missing artifactId!" | ||
fi | ||
if [ -z "$packaging" ]; then | ||
error_and_exit "missing packaging!" | ||
fi | ||
|
||
version=`cat $versionFile` | ||
artifactName="${artifactId}-${version}.${packaging}" | ||
|
||
cd $inputDir | ||
./mvnw clean package -Pci -DversionNumber=$version | ||
|
||
# Copy war file to concourse output folder | ||
cd .. | ||
cp $inputDir/target/$artifactName $outputDir/$artifactName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,25 @@ | ||
--- | ||
platform: linux | ||
|
||
image: docker:///java#8 | ||
|
||
params: | ||
MAVEN_OPTS: | ||
MAVEN_CONFIG: | ||
|
||
inputs: | ||
- name: pcfdemo | ||
- name: version | ||
|
||
outputs: | ||
- name: build | ||
|
||
run: | ||
path: pcfdemo/ci/tasks/build.sh | ||
args: [ | ||
--input-dir, pcfdemo, | ||
--output-dir, build, | ||
--version-file, version/number, | ||
--artifactId, pcf-demo, | ||
--packaging, war | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,30 @@ | ||
#!/bin/sh | ||
|
||
# Set the basedir for Maven wrapper script to find the .mvn folder | ||
export MAVEN_BASEDIR=pcfdemo | ||
inputDir= | ||
|
||
pcfdemo/mvnw --file=pcfdemo/pom.xml clean verify | ||
while [ $# -gt 0 ]; do | ||
case $1 in | ||
-i | --input-dir ) | ||
inputDir=$2 | ||
shift | ||
;; | ||
* ) | ||
echo "Unrecognized option: $1" 1>&2 | ||
exit 1 | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
error_and_exit() { | ||
echo $1 >&2 | ||
exit 1 | ||
} | ||
|
||
if [ ! -d "$inputDir" ]; then | ||
error_and_exit "missing input directory: $inputDir" | ||
fi | ||
|
||
cd $inputDir | ||
|
||
./mvnw clean verify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
--- | ||
platform: linux | ||
|
||
image: docker:///java#8 | ||
|
||
inputs: | ||
- name: pcfdemo | ||
|
||
run: | ||
path: pcfdemo/ci/tasks/integration.sh | ||
args: [ | ||
--input-dir, pcfdemo | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
baseName="pcf-demo" | ||
|
||
inputDir= # required | ||
outputDir= # required | ||
versionFile= # optional | ||
|
||
while [ $# -gt 0 ]; do | ||
case $1 in | ||
-i | --input-dir ) | ||
inputDir=$2 | ||
shift | ||
;; | ||
-o | --output-dir ) | ||
outputDir=$2 | ||
shift | ||
;; | ||
-v | --version-file ) | ||
versionFile=$2 | ||
shift | ||
;; | ||
* ) | ||
echo "Unrecognized option: $1" 1>&2 | ||
exit 1 | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
if [ ! -d "$inputDir" ]; then | ||
echo "missing input directory!" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d "$outputDir" ]; then | ||
echo "missing output directory!" | ||
exit 1 | ||
fi | ||
|
||
if [ -f "$versionFile" ]; then | ||
version=`cat $versionFile` | ||
baseName="${baseName}-${version}" | ||
fi | ||
|
||
inputWar=`find $inputDir -name '*.war'` | ||
outputWar="${outputDir}/${baseName}.war" | ||
|
||
echo "Renaming ${inputWar} to ${outputWar}" | ||
|
||
cp ${inputWar} ${outputWar} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
--- | ||
platform: linux | ||
|
||
image: docker:///java#8 | ||
|
||
inputs: | ||
- name: pcfdemo | ||
- name: candidate-release | ||
- name: version | ||
|
||
outputs: | ||
- name: prepare-final | ||
|
||
run: | ||
path: pcfdemo/ci/tasks/rename-artifact.sh | ||
args: ["-d", "candidate-release", "-v", "version/number"] | ||
path: pcfdemo/ci/tasks/prepare-final.sh | ||
args: [ | ||
"--input-dir", "candidate-release", | ||
"--output-dir", "prepare-final", | ||
"--version-file", "version/number" | ||
] |
Oops, something went wrong.