From 29e955e22b143009e3f2f27af8296ac8a5942ffb Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Wed, 26 Jun 2019 14:28:34 -0700 Subject: [PATCH 1/2] README: update comments --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 5f17d33bd..cbec6c4a7 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,9 @@ * TLS support * *Basic* and TLS mutual authentication * Swagger based documentation + +# Caveats + +* go 1.12+ +* Image name consists of only one path component, for example, _busybox:latest_ instead _ubuntu/busybox:latest_ +* The OCI distribution spec is still WIP, and we try to keep up From c142daff87297173a2c2b32cd02933c70c00f88c Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Wed, 26 Jun 2019 14:31:43 -0700 Subject: [PATCH 2/2] CI/CD: code coverage and bazel improvements --- .travis.yml | 8 ++++++++ Makefile | 2 +- Makefile.bazel | 8 ++++++-- README.md | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index b0151452b..fe557c322 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,16 @@ matrix: notifications: email: false +cache: + directories: + - $HOME/.bzrepos + - $HOME/.cache/bazel + install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -N https://github.com/bazelbuild/bazel/releases/download/0.26.1/bazel-0.26.1-installer-linux-x86_64.sh && chmod +x bazel-0.26.1-installer-linux-x86_64.sh && ./bazel-0.26.1-installer-linux-x86_64.sh --user; go get -u github.com/swaggo/swag/cmd/swag; go mod download; fi script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make && make -f Makefile.bazel build; fi + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/Makefile b/Makefile index a56b77807..c5f8d7cbd 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ debug: doc .PHONY: test test: - go test -v -race -cover ./pkg/... ./cmd/... + go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... ./bin/golangci-lint: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1 diff --git a/Makefile.bazel b/Makefile.bazel index 22a1a1ab1..a4f217436 100644 --- a/Makefile.bazel +++ b/Makefile.bazel @@ -1,6 +1,10 @@ OS := $(shell uname -s | tr A-Z a-z) BINARY_PREFIX_DIRECTORY := $(OS)_amd64_stripped BAZEL=$(HOME)/bin/bazel +BAZELOPTS= --repository_cache="$$HOME/.bzrepos" \ + --test_output=errors \ + --noshow_progress \ + --noshow_loading_progress .PHONY: all all: build check @@ -31,8 +35,8 @@ init: setup-base update-bazel fmt-bazel .PHONY: build build: - ${BAZEL} build //... - ${BAZEL} test //... + ${BAZEL} build ${BAZELOPTS} //... + ${BAZEL} test ${BAZELOPTS} //... .PHONY: check check: diff --git a/README.md b/README.md index cbec6c4a7..3c5a44998 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# zot [![Build Status](https://travis-ci.org/anuvu/zot.svg?branch=master)](https://travis-ci.org/anuvu/zot) +# zot [![Build Status](https://travis-ci.org/anuvu/zot.svg?branch=master)](https://travis-ci.org/anuvu/zot) [![codecov.io](http://codecov.io/github/anuvu/zot/coverage.svg?branch=master)](http://codecov.io/github/anuvu/zot?branch=master) **zot** is a single-purpose OCI image repository server based on the [OCI distribution spec](https://github.com/opencontainers/distribution-spec).