You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wf...@apache.org on 2015/08/25 00:19:25 UTC
aurora-packaging git commit: Parameterize artifact version in
builders.
Repository: aurora-packaging
Updated Branches:
refs/heads/master 7f1e5d850 -> 718acac91
Parameterize artifact version in builders.
Bugs closed: AURORA-1410
Reviewed at https://reviews.apache.org/r/37731/
Project: http://git-wip-us.apache.org/repos/asf/aurora-packaging/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora-packaging/commit/718acac9
Tree: http://git-wip-us.apache.org/repos/asf/aurora-packaging/tree/718acac9
Diff: http://git-wip-us.apache.org/repos/asf/aurora-packaging/diff/718acac9
Branch: refs/heads/master
Commit: 718acac91451923fc5f9914ecc5a1935474e3ce5
Parents: 7f1e5d8
Author: Bill Farner <wf...@apache.org>
Authored: Mon Aug 24 15:19:10 2015 -0700
Committer: Bill Farner <wf...@twitter.com>
Committed: Mon Aug 24 15:19:10 2015 -0700
----------------------------------------------------------------------
README.md | 3 ++-
build-artifact.sh | 9 ++++++---
builder/deb/ubuntu-trusty/build.sh | 2 +-
3 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/718acac9/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index e45f22f..0dfb884 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,8 @@ installation before proceeding.
```
./build-artifact.sh builder/deb/ubuntu-trusty \
- ~/Downloads/apache-aurora-0.9.0.tar.gz
+ ~/Downloads/apache-aurora-0.9.0.tar.gz \
+ 0.9.0
```
When this completes, debs will be placed in `dist/builder/deb/ubuntu-trusty/`.
http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/718acac9/build-artifact.sh
----------------------------------------------------------------------
diff --git a/build-artifact.sh b/build-artifact.sh
index e6ea723..263851c 100755
--- a/build-artifact.sh
+++ b/build-artifact.sh
@@ -19,27 +19,30 @@ print_available_builders() {
find builder -name Dockerfile | sed "s/\/Dockerfile$//"
}
-if [[ $# -ne 2 ]]; then
- echo "usage: $0 BUILDER RELEASE_TAR"
+if [[ $# -ne 3 ]]; then
+ echo "usage: $0 BUILDER RELEASE_TAR AURORA_VERSION"
echo 'Where BUILDER is a builder directory in:'
print_available_builders
exit 1
else
BUILDER_DIR=$1
RELEASE_TAR=$2
+ AURORA_VERSION=$3
fi
IMAGE_NAME="aurora-$(basename $BUILDER_DIR)"
+echo "Using docker image $IMAGE_NAME"
docker build -t "$IMAGE_NAME" "$BUILDER_DIR"
ARTIFACT_DIR="$(pwd)/dist/$BUILDER_DIR"
mkdir -p $ARTIFACT_DIR
docker run \
--rm \
+ -e AURORA_VERSION=$AURORA_VERSION \
-v "$(pwd)/specs:/specs:ro" \
-v "$(realpath $RELEASE_TAR):/src.tar.gz:ro" \
-v "$ARTIFACT_DIR:/dist" \
-t "$IMAGE_NAME" /build.sh
-echo 'Produced artifacts:'
+echo "Produced artifacts in $ARTIFACT_DIR:"
ls $ARTIFACT_DIR
http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/718acac9/builder/deb/ubuntu-trusty/build.sh
----------------------------------------------------------------------
diff --git a/builder/deb/ubuntu-trusty/build.sh b/builder/deb/ubuntu-trusty/build.sh
index 6bee0e7..9c162c7 100755
--- a/builder/deb/ubuntu-trusty/build.sh
+++ b/builder/deb/ubuntu-trusty/build.sh
@@ -24,7 +24,7 @@ cp -R /specs/debian .
dch \
-b \
- -v $(cat .auroraversion)~SNAPSHOT \
+ -v $AURORA_VERSION \
-u low --maintmaint \
"Apache Aurora package builder <de...@aurora.apache.org> $(date -R)"