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

ease disabling docker #19

Merged
merged 2 commits into from
Aug 14, 2018
Merged

ease disabling docker #19

merged 2 commits into from
Aug 14, 2018

Conversation

paulfantom
Copy link
Contributor

@paulfantom paulfantom commented Aug 14, 2018

This allows to easily disable dockerized build env by setting NO_DOCKER env variable to anything.

This is also needed for CI system.

Example run:

make build              # build in docker container (golang:1.10)
NO_DOCKER=1 make build  # build using host env

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: paulfantom
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:

If they are not already assigned, you can assign the PR to them by writing /assign in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 14, 2018
Makefile Outdated
@@ -6,7 +6,9 @@ IMAGE = $(REGISTRY)machine-api-operator
.PHONY: all
all: check build test

DOCKER_CMD := docker run --rm -v "$(PWD)":/go/src/github.com/openshift/machine-api-operator:Z -w /go/src/github.com/openshift/machine-api-operator golang:1.10
ifndef NO_DOCKER
Copy link
Member

Choose a reason for hiding this comment

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

Cant' we just set DOCKER_CMD to point to the env variable value, otherwise to default
Otherwise with this approach you'd want to clean DOCKER_CMD when NO_DOCKER is set, if you don't and as a user I set env DOCKER_CMD to something and later I set NO_DOCKER=1, DOCKER_CMD still will run my previews command

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cant' we just set DOCKER_CMD to point to the env variable value, otherwise to default

I need something that unsets DOCKER_CMD and not sets it to something (not even empty string). Solution you propose, won't do it.
I was thinking about some other checks, but this is far simpler and I don't want to create some advanced Makefile which only I will know how it works.

@paulfantom paulfantom merged commit 0fd6f4d into master Aug 14, 2018
@paulfantom paulfantom deleted the no_docker branch August 14, 2018 13:54
ingvagabund added a commit to ingvagabund/machine-api-operator that referenced this pull request Aug 24, 2018
Fix machine status updates due to wrong APIVersion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants