Skip to content
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

Use Go Modules #274

Merged
merged 9 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
- name: install go
uses: actions/setup-go@v2
with:
go-version: 1.12
- name: install
run: make install
go-version: "1.20"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the double quote necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes—without it, YAML interprets this as "1.2" and you get a very old version of Go.

- name: test
run: make test_unit
lint:
Expand All @@ -42,9 +40,7 @@ jobs:
- name: install go
uses: actions/setup-go@v2
with:
go-version: 1.12
- name: install
run: make install
go-version: "1.20"
- name: test
run: make lint
integration-tests:
Expand All @@ -63,7 +59,7 @@ jobs:
- name: install go
uses: actions/setup-go@v2
with:
go-version: 1.12
go-version: "1.20"
- name: install
run: integ/install.sh
- name: setup
Expand Down
14 changes: 5 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
FROM golang:1.13.4-alpine3.10 as builder
FROM golang:1.20.2-alpine3.17 as builder
RUN apk add git openssh-client make curl bash

COPY boilerplate/lyft/golang_test_targets/dep_install.sh /go/src/github.com/lyft/flinkk8soperator/

# COPY only the dep files for efficient caching
COPY Gopkg.* /go/src/github.com/lyft/flinkk8soperator/
COPY go.mod go.sum /go/src/github.com/lyft/flinkk8soperator/
WORKDIR /go/src/github.com/lyft/flinkk8soperator

# Pull dependencies
RUN : \
&& sh dep_install.sh \
&& dep ensure -vendor-only
RUN go mod download

# COPY the rest of the source code
COPY . /go/src/github.com/lyft/flinkk8soperator/

# This 'linux_compile' target should compile binaries to the /artifacts directory
# The main entrypoint should be compiled to /artifacts/flinkk8soperator
RUN make linux_compile
RUN go mod vendor && make linux_compile

# update the PATH to include the /artifacts directory
ENV PATH="/artifacts:${PATH}"

# This will eventually move to centurylink/ca-certs:latest for minimum possible image size
FROM alpine:3.10
FROM alpine:3.17
COPY --from=builder /artifacts /bin
CMD ["flinkoperator"]
Loading