Skip to content

Commit 2a42a21

Browse files
author
Adib Rastegarnia
authored
Fix minor issues (#1)
* Fix minor issues * Add travis config file * Update README
1 parent c2022a3 commit 2a42a21

File tree

8 files changed

+42
-10
lines changed

8 files changed

+42
-10
lines changed

.travis.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
sudo: false
2+
3+
language: go
4+
5+
go:
6+
- '1.13.x'
7+
8+
notifications:
9+
email: false
10+
11+
branches:
12+
only:
13+
- master
14+
15+
cache:
16+
directories:
17+
- $HOME/gopath/pkg/mod # Cache the Go modules
18+
19+
before_script:
20+
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest
21+
22+
jobs:
23+
include:
24+
- stage: test
25+
script:
26+
- make test
27+
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./build/bin/push-images; fi'

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ deps: # @HELP ensure that the required dependencies are in place
2121
bash -c "diff -u <(echo -n) <(git diff go.sum)"
2222

2323
test: # @HELP run the unit tests and source code validation
24-
test: build license_check linters
24+
test: build
2525
go test github.com/atomix/cache-storage-controller/...
2626

2727
linters: # @HELP examines Go source code and reports coding problems
28-
GOGC=75 golangci-lint run
28+
GOGC=50 golangci-lint run
2929

3030
license_check: # @HELP examine and ensure license headers exist
3131
./build/licensing/boilerplate.py -v
3232

33-
images: # @HELP build cache-storage Docker image
34-
images: build
33+
image: # @HELP build cache-storage Docker image
34+
image: build
3535
docker build . -f build/cache-storage-controller/Dockerfile -t atomix/cache-storage-controller:${STORAGE_CONTROLLER_VERSION}
3636

3737
push: # @HELP push cache-storage Docker image

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# cache-storage-controller
2+
[![Build Status](https://travis-ci.com/atomix/cache-storage-controller.svg?branch=master)](https://travis-ci.com/atomix/cache-storage-controller)
3+
[![Go Report Card](https://goreportcard.com/badge/github.com/atomix/cache-storage-controller)](https://goreportcard.com/report/github.com/atomix/cache-storage-controller)
4+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gojp/goreportcard/blob/master/LICENSE)
5+
[![GoDoc](https://godoc.org/github.com/atomix/cache-storage-controller?status.svg)](https://godoc.org/github.com/atomix/cache-storage-controller)
6+
27
Storage controller for cache storage in Atomix Cloud

build/bin/push-images

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USER" --password-stdin
3-
make images
4-
docker push atomix/cache-storage-controller:latest
3+
make image
4+
make push
55

deploy/helm/templates/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
failureThreshold: 1
3737
env:
3838
- name: CONTROLLER_NAME
39-
value: "cache-controller"
39+
value: {{ .Release.Name }}
4040
- name: CONTROLLER_NAMESPACE
4141
valueFrom:
4242
fieldRef:

pkg/controller/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package test
15+
package controller
1616

1717
import (
1818
"context"

pkg/controller/defs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package test
15+
package controller
1616

1717
const (
1818
configVolume = "config"

pkg/controller/reconciler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package test
15+
package controller
1616

1717
import (
1818
"context"

0 commit comments

Comments
 (0)