Skip to content

Commit 9f013fe

Browse files
authored
[saas-7195] Adjust repository structure (#1)
* Add codefresh/ Add vendor/ * Fix package codefresh * Refactor repository
1 parent 20f84f6 commit 9f013fe

File tree

1,995 files changed

+669279
-1054
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,995 files changed

+669279
-1054
lines changed

Diff for: .travis.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
dist: xenial
2+
sudo: required
3+
services:
4+
- docker
5+
language: go
6+
go:
7+
- "1.13.x"
8+
9+
env:
10+
global: GOFLAGS=-mod=vendor
11+
12+
install:
13+
# This script is used by the Travis build to install a cookie for
14+
# go.googlesource.com so rate limits are higher when using `go get` to fetch
15+
# packages that live there.
16+
# See: https://github.com/golang/go/issues/12933
17+
- bash scripts/gogetcookie.sh
18+
19+
script:
20+
- make test
21+
- make vet
22+
#- make website-test
23+
24+
branches:
25+
only:
26+
- master
27+
matrix:
28+
fast_finish: true
29+
allow_failures:
30+
- go: tip

Diff for: CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## [1.0.0 (Unreleased)](https://github.com/codefresh-io/terraform-provider-codefresh/tree/HEAD)
4+
5+
[Full Changelog](https://github.com/codefresh-io/terraform-provider-codefresh/compare/17fe7e1b0003bda492682d06ba1917cae91d6faf...HEAD)

Diff for: GNUmakefile

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
TEST?=$$(go list ./... |grep -v 'vendor')
2+
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
3+
WEBSITE_REPO=github.com/hashicorp/terraform-website
4+
PKG_NAME=codefresh
5+
6+
default: build
7+
8+
tools:
9+
GO111MODULE=on go install github.com/client9/misspell/cmd/misspell
10+
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint
11+
GO111MODULE=on go install github.com/bflad/tfproviderlint/cmd/tfproviderlint
12+
13+
build: fmtcheck
14+
go install
15+
16+
fmt:
17+
@echo "==> Fixing source code with gofmt..."
18+
gofmt -s -w $(GOFMT_FILES)
19+
20+
fmtcheck:
21+
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
22+
23+
lint:
24+
@echo "==> Checking source code against linters..."
25+
golangci-lint run ./...
26+
27+
test: fmtcheck
28+
go test -i $(TEST) || exit 1
29+
echo $(TEST) | \
30+
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
31+
32+
testacc: fmtcheck
33+
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
34+
35+
test-compile:
36+
@if [ "$(TEST)" = "./..." ]; then \
37+
echo "ERROR: Set TEST to a specific package. For example,"; \
38+
echo " make test-compile TEST=./$(PKG_NAME)"; \
39+
exit 1; \
40+
fi
41+
go test -c $(TEST) $(TESTARGS)
42+
43+
vet:
44+
@echo "go vet ."
45+
@go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
46+
echo ""; \
47+
echo "Vet found suspicious constructs. Please check the reported constructs"; \
48+
echo "and fix them if necessary before submitting the code for review."; \
49+
exit 1; \
50+
fi
51+
52+
website:
53+
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
54+
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
55+
git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
56+
endif
57+
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
58+
59+
website-lint:
60+
@echo "==> Checking website against linters..."
61+
@misspell -error -source=text website/
62+
63+
website-test:
64+
ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO)))
65+
echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..."
66+
git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO)
67+
endif
68+
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)
69+
70+
.PHONY: build test testacc vet fmt fmtcheck lint tools test-compile website website-lint website-test

0 commit comments

Comments
 (0)