-
Notifications
You must be signed in to change notification settings - Fork 166
chore: Fix warnings during image build. #3172
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ export GODEBUG=x509ignoreCN=0 | |
|
|
||
| # Set variables from environment or hard-coded default | ||
| export OPERATOR_NAME=cluster-logging-operator | ||
| export CURRENT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD;) | ||
| export CURRENT_BRANCH=$(shell git rev-parse --short HEAD 2> /dev/null) | ||
|
Contributor
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. this is not CURRENT_BRANCH anymore, maybe make sense to change variable name to CURRENT_REVISION or something like this |
||
| export IMAGE_TAG?=127.0.0.1:5000/openshift/origin-$(OPERATOR_NAME):$(CURRENT_BRANCH) | ||
|
|
||
| export LOGGING_VERSION?=6.4 | ||
|
|
@@ -299,7 +299,6 @@ test-upgrade: $(JUNITREPORT) | |
| RELATED_IMAGE_LOG_FILE_METRIC_EXPORTER=$(IMAGE_LOGFILEMETRICEXPORTER) \ | ||
| IMAGE_LOGGING_EVENTROUTER=$(IMAGE_LOGGING_EVENTROUTER) \ | ||
| exit 0 | ||
|
|
||
|
|
||
| .PHONY: test-e2e | ||
| test-e2e: $(JUNITREPORT) | ||
|
|
@@ -342,10 +341,13 @@ cluster-logging-catalog: cluster-logging-catalog-build cluster-logging-catalog-d | |
| .PHONY: cluster-logging-cleanup | ||
| cluster-logging-cleanup: cluster-logging-operator-uninstall cluster-logging-catalog-uninstall | ||
|
|
||
| # olm_deploy targets excluded if olm_deploy does not exist - e.g. during image build. | ||
| ifneq ($(wildcard olm_deploy),) | ||
|
|
||
| .PHONY: cluster-logging-catalog-build | ||
| # builds an operator-registry image containing the cluster-logging operator | ||
| cluster-logging-catalog-build: .target/cluster-logging-catalog-build | ||
| .target/cluster-logging-catalog-build: $(shell find olm_deploy -type f) | ||
| .target/cluster-logging-catalog-build: | ||
|
Contributor
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. I wonder if we can just remove the dependency on this and the target below. The lower one is already phony, so its dependencies do not really matter anyway ... and I think this one can lose its indirection and be made phony as well. |
||
| olm_deploy/scripts/catalog-build.sh | ||
| touch $@ | ||
|
|
||
|
|
@@ -369,6 +371,8 @@ cluster-logging-operator-install: | |
| cluster-logging-operator-uninstall: | ||
| olm_deploy/scripts/operator-uninstall.sh | ||
|
|
||
| endif | ||
|
|
||
| # | ||
| # Targets for installing the operator to a cluster using operator-sdk run bundle | ||
| # | ||
|
|
@@ -380,7 +384,7 @@ cluster-logging-operator-uninstall: | |
|
|
||
| REGISTRY_BASE ?= $(error REGISTRY_BASE needs to be set for the olm- targets to work) | ||
| REPOSITORY_BASE ?= $(REGISTRY_BASE)/cluster-logging-operator | ||
| DEV_VERSION := 0.0.1$(shell date +%m%d%H%M)-$(shell git rev-parse --short HEAD) | ||
| DEV_VERSION := 0.0.1$(shell date +%m%d%H%M)-$(CURRENT_BRANCH) | ||
| OLM_VERSION ?= $(DEV_VERSION) | ||
| OPERATOR_IMAGE ?= $(REPOSITORY_BASE):$(OLM_VERSION) | ||
| BUNDLE_IMAGE ?= $(REPOSITORY_BASE)-bundle:$(OLM_VERSION) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
fwiw: "current branch" is then also wrong as the output of
rev-parse --short HEADwill always be a commit-hash.