-
Notifications
You must be signed in to change notification settings - Fork 28
Makefile setup, test stubs #3
Makefile setup, test stubs #3
Conversation
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.
I bet 90% of the copy'n'pasted Makefile stuff is not used and therefore shouldn't be added. I would rather start fresh. Especially the test.mk file is way to heavy and shouldn't be copied 1:1.
@@ -0,0 +1,37 @@ | |||
FROM centos:7 |
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.
Instead of having two Dockerfiles, we should start using multi-staged Dockerfiles.
@kwk no, all of the code is used/tested/inspected with the exception of the coverage and the windows stuff. There is not much overhead and I have gone over the make process line-by-line. @dipak-pawar did a great job there. |
Gopkg.lock
Outdated
revision = "de5bf2ad457846296e2031421a34e2568e304e35" | ||
|
||
[[projects]] | ||
digest = "1:4b8b5811da6970495e04d1f4e98bb89518cc3cfc3b3f456bdb876ed7b6c74049" | ||
branch = "master" | ||
name = "github.com/alexeykazakov/devconsole" |
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.
We need to rename all github.com/alexeykazakov/devconsole
packages :) In a separate PR.
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.
Yeah, rebased. There are also some base image references in the dockerfiles that need updating once we know the repository address.
Opened a PR to make the code build #4 |
That is my point, the coverage stuff takes up 90% of the code and can be simplified/removed like crazy. |
Dockerfile.deploy
Outdated
LABEL maintainer "Devtools <devtools@redhat.com>" | ||
LABEL author "Devtools <devtools@redhat.com>" | ||
ENV LANG=en_US.utf8 | ||
ENV F8_INSTALL_PREFIX=/usr/local/devconsole-operator |
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.
maybe let's get rid out of F8
prefix
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.
Fixed befe3ef.
ENV F8_INSTALL_PREFIX=/usr/local/devconsole-operator | ||
|
||
# Create a non-root user and a group with the same name: "devconsole-operator" | ||
ENV F8_USER_NAME=devconsole-operator |
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.
maybe let's get rid out of F8
prefix
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.
Fixed befe3ef.
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.
@michaelkleinhenz no it wasn't fixed in befe3ef. The code is still in there. We have F8_
in various other locations and files as well if you take a look at the PR now. I suggest to keep the F8_
and not replace it now. The reason is that environment variables marked with F8_
are those that you should care about setting from the outside when running a Makefile for example: F8_POSTGRES_HOST=foo make test-integration
. Can you revert the parts of befe3ef that modify the F8_
bits please and keep the rest until we have a proper replacement for F8_
?
REGISTRY_IMAGE = ${PROJECT_NAME} | ||
|
||
ifeq ($(TARGET),rhel) | ||
REGISTRY_URL := ${REGISTRY_URI}/openshiftio/rhel-${REGISTRY_NS}-${REGISTRY_IMAGE} |
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.
can we change docker org as we are starting fresh?
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.
Same as below. Let's do this when we know how it will look like.
@@ -0,0 +1,89 @@ | |||
DOCKER_REPO?=quay.io/openshiftio |
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.
can we change this docker org?
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.
Yes, let's do this when we know what it is..
make/test.mk
Outdated
.PHONY: e2e-cleanup | ||
e2e-cleanup: | ||
oc login -u system:admin | ||
oc delete oauthclient codeready-devconsole || true |
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.
this can be removed
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.
Fixed befe3ef.
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.
Let's move on with that change :) We can improve it later. But it's IMO a good start and worth merging now so we can simplify local development a lot.
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.
@michaelkleinhenz I went through all commits and resolved all conversations that you addressed. That leaves a few open on which I would like to ask that you comment on them. @alexeykazakov Yes we can improve later but let's fix this tiny F8_
bit first, okay? Shouldn't cost much time.
ENV F8_INSTALL_PREFIX=/usr/local/devconsole-operator | ||
|
||
# Create a non-root user and a group with the same name: "devconsole-operator" | ||
ENV F8_USER_NAME=devconsole-operator |
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.
@michaelkleinhenz no it wasn't fixed in befe3ef. The code is still in there. We have F8_
in various other locations and files as well if you take a look at the PR now. I suggest to keep the F8_
and not replace it now. The reason is that environment variables marked with F8_
are those that you should care about setting from the outside when running a Makefile for example: F8_POSTGRES_HOST=foo make test-integration
. Can you revert the parts of befe3ef that modify the F8_
bits please and keep the rest until we have a proper replacement for F8_
?
@michaelkleinhenz any updates on that PR? |
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.
Agreedwith alexey, let's merge this initial version we can improve afterwards.
Not dismissing, let's address it in another PR.
* Added stub tests and makefile setup. * Exposed more targets, removed windows make code, checked coverage, minor fixes.
This adds a Makefile setup and stubs for unit and e2e tests. Execute
make
to get a list of possible targets. This was essentially taken fromtoolchain-operator
with added test setup.