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

build: Remove redundant check. Pass tests on image build. Remove test execution on make file image build. #970

Merged
merged 3 commits into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ COPY controllers/ controllers/
COPY templates/ templates/
COPY pkg/ pkg/
COPY vendor/ vendor/
COPY mocks/ mocks/
COPY config/ config/

# build operator
RUN export ARCH="$(uname -m)" && if [[ ${ARCH} == "x86_64" ]]; then export ARCH="amd64"; elif [[ ${ARCH} == "aarch64" ]]; then export ARCH="arm64"; fi && \
export MOCK_API=true && \
go test -mod=vendor -v ./... && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -a -o che-operator main.go

RUN unzip /tmp/asset-devworkspace-operator.zip */deploy/deployment/* -d /tmp && \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ run: manifests generate fmt vet ## Run a controller from your host.

IMAGE_TOOL=docker

docker-build: test ## Build docker image with the manager.
${IMAGE_TOOL} build -t ${IMG} .
docker-build: ## Build docker image with the manager.
${IMAGE_TOOL} build --no-cache -t ${IMG} .

docker-push: ## Push docker image with the manager.
${IMAGE_TOOL} push ${IMG}
Expand Down
10 changes: 0 additions & 10 deletions controllers/che/checluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,16 +654,6 @@ func TestImagePullerConfiguration(t *testing.T) {
},
expectedSubscription: subscription,
},
{
name: "image puller enabled, subscription created but has changed, should update subscription, this shouldn't happen",
initCR: InitCheCRWithImagePullerEnabled(),
initObjects: []runtime.Object{
packageManifest,
operatorGroup,
wrongSubscription,
},
expectedSubscription: subscription,
},
{
name: "image puller enabled, subscription created, should add finalizer",
initCR: InitCheCRWithImagePullerEnabled(),
Expand Down