forked from thanos-io/thanos
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Create Containerfile.operator files in preparation to move to RHTAP #102
Merged
subbarao-meduri
merged 2 commits into
stolostron:release-2.11
from
subbarao-meduri:rhtap-prep-211
May 8, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright Contributors to the Open Cluster Management project | ||
# Licensed under the Apache License 2.0 | ||
|
||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder | ||
|
||
WORKDIR $GOPATH/src/github.com/thanos-io/thanos | ||
|
||
COPY . $GOPATH/src/github.com/thanos-io/thanos | ||
|
||
RUN git update-index --refresh; make build -f Makefile.rhtap | ||
|
||
# ----------------------------------------------------------------------------- | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
LABEL maintainer="The ACM Thanos maintainers" | ||
|
||
COPY --from=builder /go/bin/thanos /bin/thanos | ||
|
||
RUN microdnf update -y && microdnf clean all | ||
|
||
ENTRYPOINT [ "/bin/thanos" ] |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
include Makefile | ||
|
||
# Override build, crossbuild targets from Makefile | ||
# to use promu to build dynamic binaries | ||
.PHONY: build | ||
build: ## Builds Thanos binary using `promu`. | ||
build: check-git deps $(PROMU) | ||
@echo ">> building Thanos binary in $(PREFIX)" | ||
@go mod vendor && $(PROMU) -c ".promu.prow.yaml" build -v --cgo --prefix $(PREFIX) | ||
|
||
GIT_BRANCH=$(shell $(GIT) rev-parse --abbrev-ref HEAD) | ||
.PHONY: crossbuild | ||
crossbuild: ## Builds all binaries for all platforms. | ||
ifeq ($(GIT_BRANCH), main) | ||
crossbuild: | $(PROMU) | ||
@echo ">> crossbuilding all binaries" | ||
# we only care about below two for the main branch | ||
@go mod vendor && $(PROMU) -c ".promu.prow.yaml" crossbuild -v --cgo -p linux/amd64 | ||
else | ||
crossbuild: | $(PROMU) | ||
@echo ">> crossbuilding all binaries" | ||
@go mod vendor && $(PROMU) -c ".promu.prow.yaml" crossbuild -v --cgo | ||
endif |
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.
@subbarao-meduri how will we maintain this Makefile? What do we have to do when it diverges from upstream? Can we not duplicate everything but only extend the make targets that we need?
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.
@douglascamata I re-did the new Makefile targets to only override specific targets while including original Makefile. This should make it easier to maintain. Please review.