-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* cosigned: update golang to 1.17.0 Signed-off-by: Carlos Panato <[email protected]> * helm: add jobs to lint/test/release the cosigned helm chart Signed-off-by: Carlos Panato <[email protected]> * update chart Signed-off-by: Carlos Panato <[email protected]>
- Loading branch information
Showing
10 changed files
with
192 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Helm CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
go: ${{ steps.filter.outputs.go }} | ||
charts: ${{ steps.filter.outputs.charts }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
filters: | | ||
charts: | ||
- 'chart/cosigned/Chart.yaml' | ||
- 'chart/cosigned/**/*' | ||
helm: | ||
name: Helm chart | ||
runs-on: ubuntu-latest | ||
needs: | ||
- changes | ||
if: | | ||
(needs.changes.outputs.charts == 'true') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.0 | ||
|
||
- uses: sigstore/[email protected] | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint --config chart/ct.yaml | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
|
||
- name: Install Cert-Manager | ||
run: | | ||
helm install \ | ||
cert-manager jetstack/cert-manager \ | ||
--namespace cert-manager \ | ||
--create-namespace \ | ||
--version v1.5.0 \ | ||
--set installCRDs=true | ||
- name: Create temp secret for testing | ||
run: | | ||
export COSIGN_PASSWORD=honk@123 | ||
cosign generate-key-pair | ||
kubectl create secret generic ci-honk-secret -n default --from-file=cosign.pub=./cosign.pub | ||
kubectl wait --for=condition=ready --timeout=300s pod --all -n cert-manager | ||
kubectl get po -A | ||
- name: Run chart-testing (install) | ||
run: ct install --config chart/ct.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Helm Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
changes: | ||
runs-on: ubuntu-latest | ||
if: | | ||
(github.repository == 'sigstore/cosign') | ||
outputs: | ||
charts: ${{ steps.filter.outputs.charts }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
filters: | | ||
charts: | ||
- 'chart/cosigned/Chart.yaml' | ||
- 'chart/cosigned/**/*' | ||
release: | ||
name: Release Chart | ||
runs-on: ubuntu-latest | ||
needs: | ||
- changes | ||
if: | | ||
(github.repository == 'sigstore/cosign') && | ||
(needs.changes.outputs.charts == 'true') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.0 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
charts_dir: chart | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2021 The Sigstore Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
webhook: | ||
secretKeyRef: | ||
name: k8s://default/ci-honk-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,4 @@ metadata: | |
spec: | ||
selfSigned: {} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2021 The Sigstore Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# See https://github.com/helm/chart-testing#configuration | ||
chart-dirs: | ||
- chart | ||
remote: origin | ||
target-branch: main | ||
chart-repos: | ||
- stable=https://charts.helm.sh/stable | ||
- jetstack=https://charts.jetstack.io |