-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to v0.53 and support with-browser #29
Open
anton-iermolenko
wants to merge
1
commit into
grafana:main
Choose a base branch
from
anton-iermolenko:browser-0.53
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
FROM golang:1.19-alpine as builder | ||
FROM golang:1.23-alpine AS builder | ||
WORKDIR $GOPATH/src/go.k6.io/k6 | ||
ADD . . | ||
RUN apk --no-cache add git | ||
RUN CGO_ENABLED=0 go install go.k6.io/xk6/cmd/xk6@latest | ||
RUN CGO_ENABLED=0 xk6 build --with github.com/grafana/xk6-output-timescaledb=. --output /tmp/k6 | ||
RUN CGO_ENABLED=0 xk6 build v0.53.0 --with github.com/grafana/xk6-output-timescaledb=. --output /usr/bin/k6 | ||
|
||
FROM alpine:3.20.2 AS release | ||
|
||
FROM alpine:3.16 | ||
RUN apk add --no-cache ca-certificates && \ | ||
adduser -D -u 12345 -g 12345 k6 | ||
COPY --from=builder /tmp/k6 /usr/bin/k6 | ||
|
||
USER 12345 | ||
COPY --from=builder /usr/bin/k6 /usr/bin/k6 | ||
|
||
USER k6 | ||
WORKDIR /home/k6 | ||
|
||
ENTRYPOINT ["k6"] | ||
|
||
FROM release AS with-browser | ||
|
||
USER root | ||
|
||
COPY --from=release /usr/bin/k6 /usr/bin/k6 | ||
RUN apk --no-cache add chromium-swiftshader | ||
|
||
USER k6 | ||
|
||
ENV CHROME_BIN=/usr/bin/chromium-browser | ||
ENV CHROME_PATH=/usr/lib/chromium/ | ||
|
||
ENV K6_BROWSER_HEADLESS=true | ||
# no-sandbox chrome arg is required to run chrome browser in | ||
# alpine and avoids the usage of SYS_ADMIN Docker capability | ||
ENV K6_BROWSER_ARGS=no-sandbox | ||
|
||
ENTRYPOINT ["k6"] |
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,35 +1,36 @@ | ||
module github.com/grafana/xk6-output-timescaledb | ||
|
||
go 1.19 | ||
go 1.20 | ||
|
||
require ( | ||
github.com/jackc/pgx/v5 v5.2.0 | ||
github.com/sirupsen/logrus v1.9.0 | ||
github.com/stretchr/testify v1.8.2 | ||
go.k6.io/k6 v0.45.1 | ||
github.com/sirupsen/logrus v1.9.3 | ||
github.com/stretchr/testify v1.9.0 | ||
go.k6.io/k6 v0.53.0 | ||
gopkg.in/guregu/null.v3 v3.3.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/fatih/color v1.15.0 // indirect | ||
github.com/fatih/color v1.17.0 // indirect | ||
github.com/jackc/pgpassfile v1.0.0 // indirect | ||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect | ||
github.com/jackc/puddle/v2 v2.1.2 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mattn/go-colorable v0.1.13 // indirect | ||
github.com/mattn/go-isatty v0.0.18 // indirect | ||
github.com/mattn/go-isatty v0.0.20 // indirect | ||
github.com/mstoykov/atlas v0.0.0-20220811071828-388f114305dd // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/rogpeppe/go-internal v1.9.0 // indirect | ||
github.com/spf13/afero v1.1.2 // indirect | ||
go.uber.org/atomic v1.10.0 // indirect | ||
golang.org/x/crypto v0.9.0 // indirect | ||
golang.org/x/sync v0.2.0 // indirect | ||
golang.org/x/sys v0.8.0 // indirect | ||
golang.org/x/text v0.9.0 // indirect | ||
golang.org/x/time v0.3.0 // indirect | ||
golang.org/x/crypto v0.25.0 // indirect | ||
golang.org/x/sync v0.7.0 // indirect | ||
golang.org/x/crypto/ecdh v1.23.0 // indirect | ||
golang.org/x/sys v0.22.0 // indirect | ||
golang.org/x/text v0.16.0 // indirect | ||
golang.org/x/time v0.5.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default
xk6
uses the latest version of k6 required by extensions and sincexk6-output-timescaledb
is now locked to v0.53, this will be the lowest version used to build the binary. Is there any other reason to v0.53 specified here explicitly? Otherwise I'd suggest to drop this change.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also any reason to change the target directory to
/usr/bin
?