-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3926fbd
commit 35f10f2
Showing
10 changed files
with
49 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
FROM golang:1.19.7-alpine3.17 | ||
FROM golang:1.20.2-alpine3.17 | ||
|
||
# add addtional packages needed for the race detector to work | ||
RUN apk add --update build-base make | ||
# Add addtional packages needed for the race detector to work | ||
RUN apk add --update build-base make | ||
|
||
# add a non-root user to run our code as | ||
RUN adduser --disabled-password --gecos "" appuser | ||
# Add a non-root user to run our code as | ||
RUN adduser --disabled-password appuser | ||
|
||
WORKDIR /opt/test-runner | ||
COPY . . | ||
# Copy the source code into the container | ||
# and make sure appuser owns all of it | ||
COPY --chown=appuser:appuser . /opt/test-runner | ||
|
||
# Build and run the testrunner with appuser | ||
USER appuser | ||
|
||
# This populates the build cache with the standard library | ||
# and command packages so future compilations are faster | ||
RUN go build std cmd | ||
|
||
# Install external packages | ||
WORKDIR /opt/test-runner/external-packages | ||
RUN go mod download | ||
# Populate the build cache with the external packages | ||
RUN go build ./... | ||
|
||
# Build the test runner | ||
WORKDIR /opt/test-runner | ||
RUN GOOS=linux GOARCH=amd64 go build -o /opt/test-runner/bin/test-runner /opt/test-runner | ||
|
||
USER appuser | ||
ENV GOCACHE=/tmp | ||
RUN go build -o /opt/test-runner/bin/test-runner /opt/test-runner | ||
|
||
ENTRYPOINT ["sh", "/opt/test-runner/bin/run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"status": "error", | ||
"version": 3, | ||
"message": "# gigasecond [gigasecond.test]\n./broken.go: undefined: unknownVar\n./broken.go: undefined: UnknownFunction\nFAIL\tgigasecond [build failed]\n'PATH_PLACEHOLDER test --short --json .' returned exit code 2: exit status 2", | ||
"message": "# gigasecond [gigasecond.test]\n./broken.go: undefined: unknownVar\n./broken.go: undefined: UnknownFunction\nFAIL\tgigasecond [build failed]\n'PATH_PLACEHOLDER test --short --json .' returned exit code 1: exit status 1", | ||
"tests": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"status": "error", | ||
"version": 3, | ||
"message": "# gigasecond [gigasecond.test]\n./missing_func_test.go: undefined: AddGigasecond\n./missing_func_test.go: undefined: AddGigasecond\nFAIL\tgigasecond [build failed]\n'PATH_PLACEHOLDER test --short --json .' returned exit code 2: exit status 2", | ||
"message": "# gigasecond [gigasecond.test]\n./missing_func_test.go: undefined: AddGigasecond\n./missing_func_test.go: undefined: AddGigasecond\nFAIL\tgigasecond [build failed]\n'PATH_PLACEHOLDER test --short --json .' returned exit code 1: exit status 1", | ||
"tests": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.