Skip to content

Commit

Permalink
revert: add Athens Go proxy configuration for docker (#8)
Browse files Browse the repository at this point in the history
* fix: workflow yaml indentation in go-checks

* revert: add Athens Go proxy configuration for docker

Due to this repo being public-facing, it isn't allowed to access the
private composite action in `cultureamp/go-private-modules`. This
results in an error where the go-checks action fails to run because
it is unable to pull the action.

Since this repository is public and not using private deps, we can
undo this change.

* test: update environment variable names
In an earlier commit, the Buildkite environment variable was renamed
to reflect the repo. After this change, the test suite was not running
in CI, hence this wasn't caught in review time.

This change is a follow up to the earlier commit that allows the tests
to pass.
  • Loading branch information
therealvio authored Dec 3, 2024
1 parent 79088c1 commit 5c51433
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 25 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/go-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure Go environment with access to private modules
uses: cultureamp/go-private-modules@v1
with:
github-token: "${{ secrets.GO_PRIVATE_MODULES_TOKEN }}"

- uses: actions/setup-go@v5
with:
go-version-file: src/go.mod
Expand All @@ -32,11 +27,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure Go environment with access to private modules
uses: cultureamp/go-private-modules@v1
with:
github-token: "${{ secrets.GO_PRIVATE_MODULES_TOKEN }}"

- uses: actions/setup-go@v5
with:
go-version-file: src/go.mod
Expand All @@ -55,11 +45,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure Go environment with access to private modules
uses: cultureamp/go-private-modules@v1
with:
github-token: "${{ secrets.GO_PRIVATE_MODULES_TOKEN }}"

- uses: actions/setup-go@v5
with:
go-version-file: src/go.mod
Expand Down
4 changes: 0 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@ services:
build:
context: src
dockerfile: Dockerfile
args:
- GONOPROXY
- GOPRIVATE
- GOPROXY
4 changes: 0 additions & 4 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ RUN go mod verify

COPY . ./

ARG GONOPROXY
ARG GOPRIVATE
ARG GOPROXY

# build as a static binary without debug symbols
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
-ldflags='-w -s -extldflags "-static"' -a \
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestFetchConfigFromEnvironment(t *testing.T) {
var config plugin.Config
fetcher := plugin.EnvironmentConfigFetcher{}

t.Setenv("BUILDKITE_PLUGIN_EXAMPLE_GO_MESSAGE", "test-message")
t.Setenv("BUILDKITE_PLUGIN_ECS_TASK_RUNNER_MESSAGE", "test-message")

err := fetcher.Fetch(&config)

Expand Down
2 changes: 1 addition & 1 deletion src/plugin/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestDoesAnnotate(t *testing.T) {
ctx := context.Background()
annotation := "test-message"

t.Setenv("BUILDKITE_PLUGIN_EXAMPLE_GO_MESSAGE", annotation)
t.Setenv("BUILDKITE_PLUGIN_ECS_TASK_RUNNER_MESSAGE", annotation)
agent.Mock.On("Annotate", ctx, annotation, "info", "message").Return(nil)

err := examplePlugin.Run(ctx, fetcher, agent)
Expand Down

0 comments on commit 5c51433

Please sign in to comment.