Skip to content
This repository was archived by the owner on Oct 4, 2019. It is now read-only.

Initial makefile and minishift setup #2

Merged
merged 6 commits into from
Mar 22, 2019
Merged
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
Prev Previous commit
Next Next commit
Rename apiserver to gitserver
alexeykazakov committed Mar 22, 2019
commit 26b2bf8d54e7712a2986c39b09a55126a21cffa6
18 changes: 9 additions & 9 deletions make/Makefile.dev
Original file line number Diff line number Diff line change
@@ -25,15 +25,15 @@ build-image:
docker build -t $(DOCKER_REPO)/$(IMAGE_NAME):$(TAG) -f Dockerfile.dev .
docker tag $(DOCKER_REPO)/$(IMAGE_NAME):$(TAG) $(DOCKER_REPO)/$(IMAGE_NAME):test

.PHONY: deploy-apiserver-only
deploy-apiserver-only:
@echo "Creating API Server..."
.PHONY: deploy-gitserver-only
deploy-gitserver-only:
@echo "Creating Git Server..."

.PHONY: clean-all
clean-all: clean-apiserver clean-resources
clean-all: clean-gitserver clean-resources

.PHONY: clean-apiserver
clean-apiserver:
.PHONY: clean-gitserver
clean-gitserver:
@echo "Deleting API Server..."
Copy link

Choose a reason for hiding this comment

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

same here

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a placeholder I would like to keep. We will need to deploy and cleanup the server anyway. But I've renamed it to gitserver instead of apiserver in redhat-developer/git-service@26b2bf8

Copy link

Choose a reason for hiding this comment

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

ok, fine


.PHONY: clean-resources
@@ -44,13 +44,13 @@ clean-resources:
@echo "Deleting CRDs..."
@oc delete -f https://raw.githubusercontent.com/redhat-developer/devopsconsole-operator/master/deploy/crds/devopsconsole_v1alpha1_gitsource_crd.yaml || true

.PHONY: deploy-apiserver
deploy-apiserver: build build-image deploy-apiserver-only
.PHONY: deploy-gitserver
deploy-gitserver: build build-image deploy-gitserver-only

.PHONY: minishift-start
minishift-start:
minishift start --cpus 4 --memory 8GB
-eval `minishift docker-env` && oc login -u system:admin
Copy link

Choose a reason for hiding this comment

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

you could also add eval minishift oc-env to install the oc command in the $PATH. Also, the syntax may be slightly different on macOS: eval $(minishift oc-env) && eval $(minishift docker-env)


.PHONY: deploy-all
deploy-all: clean-resources create-resources deps prebuild-check deploy-apiserver
deploy-all: clean-resources create-resources deps prebuild-check deploy-gitserver
6 changes: 3 additions & 3 deletions minishift/README.md
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ make create-resources
#### Build and Deploy Git Service
To build docker image and create deployment you can use following target:
```bash
make deploy-apiserver
make deploy-gitserver
```

#### Creating Resources and Deploying Git Service
@@ -91,7 +91,7 @@ make deploy-all
##### Cleaning Git Service
This removes git service.
```bash
make clean-apiserver
make clean-gitserver
```

##### Cleaning Resources Created to run Git Service
@@ -113,5 +113,5 @@ special target for it which will do that for you.
It won't create all other existing resources again. It'll build container and deploy git service only.

```bash
make deploy-apiserver
make deploy-gitserver
```