Skip to content

Commit

Permalink
Migrate to Go modules (#183)
Browse files Browse the repository at this point in the history
* Migrate to Go modules

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Add 'go mod download'

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Update machine image

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Install Go

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Fix Go installation

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Fix Go installation

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Override Go link

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Do checkout first

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Fix link

Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>

* Copy go 1.13 binary in place of circle image default binary

Signed-off-by: Scott Rigby <scott@r6by.com>

* Use latest helm v3 version, and remove install_tiller function

Signed-off-by: Scott Rigby <scott@r6by.com>

* Revert "Use latest helm v3 version, and remove install_tiller function"

This reverts commit 63dedab.

Signed-off-by: Scott Rigby <scott@r6by.com>

* Copy full go 1.13 dir into the circle machine default location after deleting initial install

Signed-off-by: Scott Rigby <scott@r6by.com>
  • Loading branch information
unguiculus authored and scottrigby committed Nov 2, 2019
1 parent a4377be commit 5b7b21e
Show file tree
Hide file tree
Showing 24 changed files with 160 additions and 375 deletions.
20 changes: 12 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,41 @@ jobs:
test:
machine:
enabled: true
working_directory: /home/circleci/.go_workspace/src/github.com/helm/chart-testing
image: circleci/classic:201808-01
steps:
- checkout
- run:
name: Install tools
command: |
mkdir /home/circleci/.go_workspace/bin
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
# We need to install Golang 1.13 because the CircleCI machine image has an outdated version.
# We need to use a CircleCI machine in order to be able to run kind.
curl -sSLO https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
sudo rm -r /usr/local/go
sudo tar -C /usr/local -xzf go1.13.4.linux-amd64.tar.gz
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
curl -sSLo kind "/~https://github.com/kubernetes-sigs/kind/releases/download/v0.5.1/kind-linux-amd64"
chmod +x kind
sudo mv kind /usr/local/bin/kind
- checkout
- run:
name: Test
command: |
dep ensure -v
go mod download
./e2e-kind.sh
build:
docker:
- image: golang:1.12.4-alpine3.9
working_directory: /go/src/github.com/helm/chart-testing
- image: golang:1.13-alpine3.10
steps:
- setup_remote_docker
- run:
name: Install tools
command: |
apk add bash build-base ca-certificates curl docker git openssh
curl -SLO /~https://github.com/goreleaser/goreleaser/releases/download/v0.102.0/goreleaser_Linux_x86_64.tar.gz
curl -SLO /~https://github.com/goreleaser/goreleaser/releases/download/v0.120.5/goreleaser_Linux_x86_64.tar.gz
mkdir -p /usr/local/goreleaser
tar -xzf goreleaser_Linux_x86_64.tar.gz -C /usr/local/goreleaser
ln -s /usr/local/goreleaser/goreleaser /usr/local/bin/goreleaser
Expand Down
21 changes: 12 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
project_name: chart-testing
before:
hooks:
- go mod download
builds:
- main: ct/main.go
binary: ct
Expand All @@ -16,15 +19,15 @@ builds:
-X github.com/helm/chart-testing/ct/cmd.Version={{ .Tag }}
-X github.com/helm/chart-testing/ct/cmd.GitCommit={{ .Commit }}
-X github.com/helm/chart-testing/ct/cmd.BuildDate={{ .Date }}
archive:
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
- etc/chart_schema.yaml
- etc/lintconf.yaml
archives:
- format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
- etc/chart_schema.yaml
- etc/lintconf.yaml
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
284 changes: 0 additions & 284 deletions Gopkg.lock

This file was deleted.

Loading

0 comments on commit 5b7b21e

Please sign in to comment.