Skip to content

Commit

Permalink
Repo improvements (#34)
Browse files Browse the repository at this point in the history
* added enhancement template
*  added PR template
* clean up makefile
* added tag as env for manifest.yaml. Changed title for network policies in readme
  • Loading branch information
jasonrichardsmith committed Sep 10, 2018
1 parent 2fc1ac5 commit f50837f
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 17 deletions.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Enhancement request
about: Suggest code improvements and documentation fixes

---
*Issues that do not impact functionality of Sentry, such as code reorganization or documentation fixes.

**Please list code or documentation changes you would suggest with links to relevant code blocks?**
Please describe and link to code blocks

**Will these changes impact the underlying manner in in which packages interact?**
Will this require refactoring of packages?
Please describe:

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:
<!-- Write your release note:
1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "action required".
2. If no release note is required, just write "NONE".
-->
```release-note
34 changes: 19 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,43 +1,47 @@
.PHONY: build buildhash minikube minikubecontext push pushhash dep test goveralls deployk8s deploydindk8s e2etests travise2e dindup buildpushhash
.PHONY: build minikube minikubecontext push test goveralls deployk8s deploydindk8s e2etests e2eclean travise2e dindup buildpushhash
SHELL=/bin/bash -eo pipefail
.DEFAULT_GOAL := build
VERSION="1.1.0-beta"
REPO="jasonrichardsmith/sentry"
REPO=jasonrichardsmith/sentry
VERSION=$(shell cat VERSION)
HASH=$(shell git log --pretty=format:'%H' -n 1)

TAG=${VERSION}
build:
docker build --no-cache -t ${REPO}:${VERSION} .
buildhash:
docker build --no-cache -t ${REPO}:${HASH} .
docker build --no-cache -t ${REPO}:${TAG} .

push:
docker push ${REPO}:${TAG}

minikube: minikubecontext build

minikubecontext:
eval $(shell minikube docker-env)
push:
docker push ${REPO}:${VERSION}
pushhash:
docker push ${REPO}:${HASH}
test:
go test ./...
goveralls:
go test -coverprofile=coverage.out ./...
${GOPATH}/bin/goveralls -coverprofile=coverage.out -service=travis-ci

deployk8s:
$(eval export TAG)
kubectl apply -f sentry-ns.yaml
./gen-cert.sh
./ca-bundle.sh
kubectl apply -f manifest-ca.yaml
deploydindk8s: deployk8s
kubectl set image deployment/sentry -n sentry webhook=jasonrichardsmith/sentry:${HASH}

deploydindk8s: hashtag deployk8s
kubectl rollout status -w -n sentry deployment/sentry

e2etests:
cd test-manifests && ./e2etest.py
e2eclean:
cd test-manifests && ./e2eclean.py

travise2e: | dindup deploydindk8s e2etests

dindup:
./dind-cluster-v1.10.sh up

buildpushhash: | buildhash pushhash
hashtag:
$(eval export TAG=${HASH})

buildpushhash: | hashtag build push
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ tags:

### NsLabels

NsLabels ensures all namespaces have labels, so you can enforce NetworkSecurityPolicies.
NsLabels ensures all namespaces have labels, so you can enforce NetworkPolicies.

```yaml
nslabels:
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.0-beta
2 changes: 1 addition & 1 deletion manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
spec:
containers:
- name: webhook
image: jasonrichardsmith/sentry:1.1.0-beta
image: jasonrichardsmith/sentry:${TAG}
imagePullPolicy: IfNotPresent
resources:
limits:
Expand Down

0 comments on commit f50837f

Please sign in to comment.