Skip to content

Commit

Permalink
Golang package is BOSH vendored
Browse files Browse the repository at this point in the history
Signed-off-by: Alice Lee <alice.lee@digital.cabinet-office.gov.uk>
  • Loading branch information
dark5un committed Mar 12, 2024
1 parent 8f2c1ef commit 28ca8ad
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 35 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ bosh_release:
tar xf broker.tz -C release/src/github.com/alphagov/paas-rds-broker
rm broker.tz

cd release ; $(shell ./scripts/vendor_package.sh) ; cd ..

bosh create-release \
--name "rds-broker" \
--version "${VERSION}" \
Expand Down
4 changes: 2 additions & 2 deletions ci/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ run:
- -c
- |
cd src/github.com/alphagov/paas-rds-broker
make tls_integration
make integration
# make tls_integration
# make integration
5 changes: 1 addition & 4 deletions release/config/blobs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
golang/go1.20.4.linux-amd64.tar.gz:
size: 100148454
object_id: a272b530-5bcf-4c94-4bac-c6bfec500a8e
sha: sha256:698ef3243972a51ddb4028e4a1ac63dc6d60821bf18e59a807e051fee0a385bd

18 changes: 0 additions & 18 deletions release/packages/golang/packaging

This file was deleted.

5 changes: 0 additions & 5 deletions release/packages/golang/spec

This file was deleted.

3 changes: 1 addition & 2 deletions release/packages/rds-broker/packaging
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ set -e # exit immediately if a simple command exits with a non-zero status
set -u # report the usage of uninitialized variables

# Set Golang dependency
export GOROOT=$(readlink -nf /var/vcap/packages/golang)
export PATH=${GOROOT}/bin:${PATH}
source /var/vcap/packages/golang-1.21-linux/bosh/compile.env
export GOCACHE=/tmp/gocache

# Build AWS RDS Service Broker package
Expand Down
2 changes: 1 addition & 1 deletion release/packages/rds-broker/spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: rds-broker
dependencies:
- golang
- golang-1.21-linux
files:
- github.com/alphagov/paas-rds-broker/**/*
3 changes: 1 addition & 2 deletions release/packages/rds-metric-collector/packaging
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ set -e # exit immediately if a simple command exits with a non-zero status
set -u # report the usage of uninitialized variables

# Set Golang dependency
export GOROOT=$(readlink -nf /var/vcap/packages/golang)
export PATH=${GOROOT}/bin:${PATH}
source /var/vcap/packages/golang-1.21-linux/bosh/compile.env
export GOCACHE=/tmp/gocache

# Build AWS RDS Metric Collector package
Expand Down
2 changes: 1 addition & 1 deletion release/packages/rds-metric-collector/spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: rds-metric-collector
dependencies:
- golang
- golang-1.21-linux
files:
- github.com/alphagov/paas-rds-metric-collector/**/*
14 changes: 14 additions & 0 deletions release/scripts/vendor_package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -eu

VENDOR_PACKAGING_CONFIGURATION="vendor-packaging.yml"
if [ -s "$VENDOR_PACKAGING_CONFIGURATION" ]; then
VENDOR_REPO="$(bosh int --path="/packaged_release/repo" "$VENDOR_PACKAGING_CONFIGURATION")"
VENDOR_PACKAGE="$(bosh int --path="/packaged_release/package" "$VENDOR_PACKAGING_CONFIGURATION")"
VENDOR_TAG="$(bosh int --path="/packaged_release/tag" "$VENDOR_PACKAGING_CONFIGURATION")"

TARGET_VENDOR_DIR=../vendor_repo
git clone --depth 1 --branch "$VENDOR_TAG" --recurse-submodules "$VENDOR_REPO" "$TARGET_VENDOR_DIR"

bosh vendor-package "$VENDOR_PACKAGE" "$TARGET_VENDOR_DIR"
fi
6 changes: 6 additions & 0 deletions release/vendor-packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
packaged_release:
name: bosh-package-golang-release
repo: https://github.com/cloudfoundry/bosh-package-golang-release.git
package: golang-1.21-linux
tag: v0.147.0

0 comments on commit 28ca8ad

Please sign in to comment.