Skip to content

Commit 8f1284a

Browse files
committed
fix pricing api endpoint
1 parent 3e43512 commit 8f1284a

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
run: make homebrew-sync-dry-run
3838

3939
- name: License Test
40-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
4140
run: make license-test
4241

4342
- name: Build Binaries

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Build the manager binary
2-
FROM golang:1.16 as builder
2+
FROM public.ecr.aws/bitnami/golang:1.16 as builder
33

44
## GOLANG env
5-
ARG GOPROXY="https://proxy.golang.org|direct"
6-
ARG GO111MODULE="on"
7-
ARG CGO_ENABLED=0
8-
ARG GOOS=linux
9-
ARG GOARCH=amd64
5+
ENV GOPROXY="https://proxy.golang.org|direct"
6+
ENV GO111MODULE="on"
7+
ENV CGO_ENABLED=0
8+
ENV GOOS=linux
9+
ENV GOARCH=amd64
1010

1111
# Copy go.mod and download dependencies
1212
WORKDIR /amazon-ec2-instance-selector

pkg/ec2pricing/ec2pricing.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ type spotPricingEntry struct {
4848
// New creates an instance of instance-selector EC2Pricing
4949
func New(sess *session.Session) *EC2Pricing {
5050
return &EC2Pricing{
51-
PricingClient: pricing.New(sess),
51+
// use us-east-1 since pricing only has endpoints in us-east-1 and ap-south-1
52+
PricingClient: pricing.New(sess.Copy(aws.NewConfig().WithRegion("us-east-1"))),
5253
EC2Client: ec2.New(sess),
5354
AWSSession: sess,
5455
}

test/go-report-card-test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1
1+
FROM public.ecr.aws/bitnami/golang:latest
22

33
WORKDIR /app
44

test/go-report-card-test/run-report-card-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ else
2020
fi
2121

2222

23-
docker run -t -v $SCRIPTPATH/../../:/app go-report-card-cli /go/bin/goreportcard-cli -v -t $THRESHOLD
23+
docker run -v $SCRIPTPATH/../../:/app go-report-card-cli /go/bin/goreportcard-cli -v -t $THRESHOLD
2424

2525
exit $EXIT_CODE

test/license-test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1
1+
FROM public.ecr.aws/bitnami/golang:latest
22

33
WORKDIR /app
44

test/license-test/run-license-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ SUPPORTED_PLATFORMS="$OS/$ARCH" make -f $SCRIPTPATH/../../Makefile build-binarie
1313

1414
SUPPORTED_PLATFORMS="$OS/$ARCH" make -s -f $SCRIPTPATH/../../Makefile build-binaries
1515
docker build --build-arg=GOPROXY=direct -t $LICENSE_TEST_TAG $SCRIPTPATH/
16-
docker run -it -e GITHUB_TOKEN --rm -v $SCRIPTPATH/:/test -v $BUILD_BIN/:/aeis-bin $LICENSE_TEST_TAG golicense /test/license-config.hcl /aeis-bin/$BINARY_NAME
16+
docker run -i -e GITHUB_TOKEN --rm -v $SCRIPTPATH/:/test -v $BUILD_BIN/:/aeis-bin $LICENSE_TEST_TAG golicense /test/license-config.hcl /aeis-bin/$BINARY_NAME

0 commit comments

Comments
 (0)