Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to gh-actions #297

Merged
merged 6 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 0 additions & 91 deletions .circleci/config.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: ci
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:

- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: shellcheck
uses: ludeeus/[email protected]

- name: Setup go
uses: actions/setup-go@v2
with:
go-version: 1.14

- uses: azure/setup-helm@v1
with:
version: v3.4.0

- name: Install tools
run: |
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 -fsSLo kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64"
chmod +x kind
sudo mv kind /usr/local/bin/kind
./setup.sh
- name: Test
run: |
./e2e-kind.sh
- name: Lint
run: |
go vet -v ./...
goimports -w -l .
go mod tidy
git diff --exit-code
- name: Build
run: |
set -o nounset
set -o pipefail
echo "Building snapshot..."
./build.sh
62 changes: 62 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: release
on:
workflow_dispatch:
inputs:
version:
description: Version
required: true

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: shellcheck
uses: ludeeus/[email protected]

- name: Setup go
uses: actions/setup-go@v2
with:
go-version: 1.14

- name: Install tools
run: |
./setup.sh

- name: Lint
run: |
go vet -v ./...
goimports -w -l .
go mod tidy
git diff --exit-code

- name: Login to registry
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ github.event.inputs.version }}
tag_prefix: ''
create_annotated_tag: true

- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o nounset
set -o pipefail

echo "Building release ${{ github.event.inputs.version }}"
./build.sh --release

27 changes: 2 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/helm/chart-testing)](https://goreportcard.com/report/github.com/helm/chart-testing)
[![CircleCI](https://circleci.com/gh/helm/chart-testing/tree/master.svg?style=svg)](https://circleci.com/gh/helm/chart-testing/tree/master)
![ci](https://github.com/helm/chart-testing/workflows/ci/badge.svg)

`ct` is the the tool for testing Helm charts.
It is meant to be used for linting and testing pull requests.
Expand Down Expand Up @@ -175,30 +175,7 @@ Here's a previous one for reference: https://github.com/helm/chart-testing/pull/

### Create Release

CircleCI creates releases automatically when a new tag is pushed.
Tags are created using `tag.sh`.

```console
$ ./tag.sh -h
Usage: tag.sh <options>

Create and push a tag.

-h, --help Display help
-d, --debug Display verbose output
-r, --remote The name of the remote to push the tag to (default: upstream)
-f, --force Force an existing tag to be overwritten
-t, --tag The name of the tag to create
-s, --skip-push Skip pushing the tag
```

By default, the script assumes that `origin` points to your own fork and that you have a remote `upstream` that points to the upstream `chart-testing` repo.
Run the script specifying the version for the new release.

```console
./tag.sh --tag <release_version>
```

The release workflow is [dispatched from github actions](https://github.com/helm/chart-testing/actions)
Versions must start with a lower-case `v`, e. g. `v3.1.1`.

## Supported versions
Expand Down
109 changes: 0 additions & 109 deletions tag.sh

This file was deleted.