Skip to content

Commit

Permalink
Merge pull request #1184 from andrewkroh/feature/apt-repo-origin
Browse files Browse the repository at this point in the history
Add 'Origin: Elastic' to the APT repo metadata
  • Loading branch information
tsg committed Mar 18, 2016
2 parents aa3016a + c593cd2 commit a072d94
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev-tools/packer/docker/deb-rpm-s3/deb-rpm-s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ bucket="packages.elasticsearch.org"
prefix="beats"
dir="/beats-packer/build/upload"
gpg_key="/beats-packer/docker/deb-rpm-s3/elasticsearch.asc"
origin=Elastic

docker run -it --rm \
--env="PASS=$PASS" \
Expand All @@ -38,6 +39,7 @@ docker run -it --rm \
--aws-access-key="$AWS_ACCESS_KEY" \
--aws-secret-key="$AWS_SECRET_KEY" \
--gpg-key="$gpg_key" \
--origin="$origin" \
--verbose \
"$@"

1 change: 1 addition & 0 deletions dev-tools/packer/docker/deb-rpm-s3/deb-s3.expect
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ spawn deb-s3 upload \
--bucket "$env(BUCKET)" \
--prefix "$env(PREFIX)/apt" \
--arch $env(arch) \
-o "$env(ORIGIN)" \
{*}$argv
expect {
"Enter passphrase: " {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ cat << EOF
-g=GPG_KEY | --gpg-key=GPG_KEY Optional. Path to GPG key file to import.
-o=ORIGIN | --origin=ORIGIN Optional. Origin to use in APT repo metadata.
-v | --verbose Optional. Enable verbose logging to stderr.
-h | --help Optional. Print this usage information.
Expand Down Expand Up @@ -85,6 +87,10 @@ parseArgs() {
usage
exit 1
;;
-o=*|--origin=*)
ORIGIN="${i#*=}"
shift
;;
-p=*|--prefix=*)
PREFIX="${i#*=}"
shift
Expand Down Expand Up @@ -132,6 +138,7 @@ parseArgs() {
fi

export BUCKET
export ORIGIN
export PREFIX
export AWS_ACCESS_KEY
export AWS_SECRET_KEY
Expand Down

0 comments on commit a072d94

Please sign in to comment.