Skip to content

Commit

Permalink
Add changes from second PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
ttomasini committed Jun 30, 2023
1 parent b0a3814 commit 77eb72b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion cmd/agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ package main

import (
"fmt"
"github.com/stretchr/testify/assert"
"os"
"testing"

"github.com/stretchr/testify/assert"
)

func TestStringSliceAddToMap(t *testing.T) {
Expand Down Expand Up @@ -126,6 +127,7 @@ func TestWriteAgentIDFileNotExists(t *testing.T) {
}
assert.EqualValues(t, "42\n", actual)
}

func TestWriteAgentIDFileExists(t *testing.T) {
parameters := []struct {
fileInput string
Expand Down
3 changes: 1 addition & 2 deletions docker/Dockerfile.agent.alpine.multiarch
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ ARG TARGETOS TARGETARCH
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
make build-agent
RUN mkdir -p /etc/woodpecker

FROM alpine:3.18
RUN apk add -U --no-cache ca-certificates
ENV GODEBUG=netdns=go
EXPOSE 3000

COPY --from=build /src/dist/woodpecker-agent /bin/
COPY --from=build /etc/woodpecker /etc
RUN mkdir -p /etc/woodpecker

HEALTHCHECK CMD ["/bin/woodpecker-agent", "ping"]
ENTRYPOINT ["/bin/woodpecker-agent"]
2 changes: 1 addition & 1 deletion docs/docs/30-administration/15-agent-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ A shared secret used by server and agents to authenticate communication. A secre
### `WOODPECKER_AGENT_SECRET_FILE`
> Default: empty
Read the value for `WOODPECKER_AGENT_SECRET` from the specified filepath
Read the value for `WOODPECKER_AGENT_SECRET` from the specified filepath, e.g. `/etc/woodpecker/agent-secret.conf`

### `WOODPECKER_LOG_LEVEL`
> Default: empty
Expand Down

0 comments on commit 77eb72b

Please sign in to comment.