-
Notifications
You must be signed in to change notification settings - Fork 560
🌱 cleanup: build #3280
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
Merged
perdasilva
merged 7 commits into
operator-framework:master
from
perdasilva:cleanup/makefile
May 27, 2024
Merged
🌱 cleanup: build #3280
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2c65774
remove *_bare.sh scripts
be8de4d
remove *_local.sh scripts and related targets
dba1dbe
remove wait and related targets and hang Dockerfile
7c8d362
remove unnecessary makefile targets
a9084b5
add golangci-lint to tools
1b30121
refactor Makefile
7d54f0b
bump gha golangci-lint version
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,11 +1,5 @@ | ||
run: | ||
timeout: 8m | ||
skip-dirs: | ||
- pkg/lib | ||
- pkg/api | ||
- pkg/fakes | ||
- pkg/package-server/apis | ||
- test/e2e | ||
|
||
linters: | ||
enable: | ||
|
@@ -21,6 +15,11 @@ linters: | |
- errcheck | ||
|
||
linters-settings: | ||
# This stanza is needed to avoid getting the warning | ||
# WARN [config_reader] The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`. | ||
errcheck: | ||
ignore: '' | ||
|
||
importas: | ||
alias: | ||
- pkg: k8s.io/api/core/v1 | ||
|
@@ -41,7 +40,13 @@ linters-settings: | |
issues: | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 | ||
exclude-dirs: | ||
- pkg/lib | ||
- pkg/api | ||
- pkg/fakes | ||
- pkg/package-server/apis | ||
- test/e2e | ||
|
||
output: | ||
format: tab | ||
formats: tab | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changes in this file are to fix warnings given by the tool |
||
sort-results: true |
This file contains hidden or 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 hidden or 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,40 +1,15 @@ | ||
FROM quay.io/fedora/fedora:37-x86_64 as builder | ||
LABEL stage=builder | ||
WORKDIR /build | ||
|
||
# install dependencies and go 1.22 | ||
|
||
# copy just enough of the git repo to parse HEAD, used to record version in OLM binaries | ||
RUN dnf update -y && dnf install -y bash make git mercurial jq wget && dnf upgrade -y | ||
RUN curl -sSL https://go.dev/dl/go1.22.2.linux-amd64.tar.gz | tar -xzf - -C /usr/local | ||
ENV PATH=/usr/local/go/bin:$PATH | ||
COPY .git/HEAD .git/HEAD | ||
COPY .git/refs/heads/. .git/refs/heads | ||
RUN mkdir -p .git/objects | ||
COPY Makefile Makefile | ||
COPY OLM_VERSION OLM_VERSION | ||
COPY pkg pkg | ||
COPY vendor vendor | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
COPY cmd cmd | ||
COPY util util | ||
COPY test test | ||
RUN CGO_ENABLED=0 make build | ||
RUN make build-util | ||
|
||
# use debug tag to keep a shell around for backwards compatibility with the previous alpine image | ||
FROM gcr.io/distroless/static:debug | ||
LABEL stage=olm | ||
WORKDIR / | ||
# bundle unpack Jobs require cp at /bin/cp | ||
RUN ["/busybox/ln", "-s", "/busybox/cp", "/bin/cp"] | ||
COPY --from=builder /build/bin/olm /bin/olm | ||
COPY --from=builder /build/bin/catalog /bin/catalog | ||
COPY --from=builder /build/bin/package-server /bin/package-server | ||
COPY --from=builder /build/bin/cpb /bin/cpb | ||
COPY --from=builder /build/bin/copy-content /bin/copy-content | ||
USER 1001 | ||
# copy goreleaser built binaries | ||
COPY olm /bin/olm | ||
COPY catalog /bin/catalog | ||
COPY package-server /bin/package-server | ||
COPY copy-content /bin/copy-content | ||
COPY cpb /bin/cpb | ||
EXPOSE 8080 | ||
EXPOSE 5443 | ||
CMD ["/bin/olm"] | ||
USER 1001 | ||
ENTRYPOINT ["/bin/olm"] |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.