Skip to content

Commit

Permalink
Merge pull request #3154 from cloudfoundry/go-buildpack
Browse files Browse the repository at this point in the history
feature(metricsforwarder): Enable go buildpack for mtar deployment
  • Loading branch information
bonzofenix authored Aug 29, 2024
2 parents e2edd4c + 43e6a8d commit 3c00ea7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/autoscaler/.cfignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
8 changes: 1 addition & 7 deletions src/autoscaler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ go-mod-vendor: ${go-vendoring-folder} ${go-vendored-files}
${go-vendoring-folder} ${go-vendored-files} &: ${app-fakes-dir} ${app-fakes-files}
go mod vendor

cf-build-%: generate-fakes
@echo "# building for cf $*"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/$* $*/cmd/$*/main.go

cf-build: $(addprefix cf-build-,$(binaries))

# CGO_ENABLED := 1 is required to enforce dynamic linking which is a requirement of dynatrace.
build-%: ${openapi-generated-clients-and-servers-dir} ${openapi-generated-clients-and-servers-files}
@echo "# building $*"
Expand Down Expand Up @@ -167,7 +161,7 @@ mta-logs:
vim mta-*

.PHONY: mta-build
mta-build: mta-build-clean cf-build
mta-build: mta-build-clean
mbt build

mta-build-clean:
Expand Down
11 changes: 8 additions & 3 deletions src/autoscaler/mta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ version: 0.0.1

modules:
- name: metricsforwarder
type: binary
path: build
type: go
path: .
properties:
GO_INSTALL_PACKAGE_SPEC: code.cloudfoundry.org/app-autoscaler/src/autoscaler/metricsforwarder/cmd/metricsforwarder
requires:
- name: config
- name: policydb
Expand All @@ -18,8 +20,11 @@ modules:
disk-quota: 1G
instances: 2
stack: cflinuxfs4
command: ./metricsforwarder
routes:
build-parameters:
builder: custom
commands:
- make vendor

resources:
- name: config
Expand Down

0 comments on commit 3c00ea7

Please sign in to comment.