-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from portefaix/feat/cicd
Configure CICD and precommit
- Loading branch information
Showing
22 changed files
with
865 additions
and
0 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,27 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: kind/bug, needs/cloud, needs/priority, needs/triage | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Configuration (please complete the following information):** | ||
- Kubernetes: [e.g. GKE] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,33 @@ | ||
# Copyright (C) 2021 Nicolas Lamirault <[email protected]> | ||
# | ||
# 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. | ||
|
||
FROM alpine:3.14 | ||
|
||
LABEL maintainer="Nicolas Lamirault <[email protected]>" \ | ||
org.opencontainers.image.title="Tools for Portefaix project" \ | ||
org.opencontainers.image.description="Tools from the Kubernetes ecosystem" \ | ||
org.opencontainers.image.authors="Nicolas Lamirault <[email protected]>" \ | ||
org.opencontainers.image.vendor="Portefaix" \ | ||
org.opencontainers.image.documentation="https://github.com/portefaix/portefaix" \ | ||
org.opencontainers.image.licenses="Apache 2.0" \ | ||
org.opencontainers.image.url="https://github.com/portefaix/portefaix" \ | ||
org.opencontainers.image.source="https://github.com/portefaix/portefaix" \ | ||
org.opencontainers.image.version="0.1.0" | ||
|
||
RUN apk add --no-cache ca-certificates curl bash tar jq | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
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,23 @@ | ||
# Copyright (C) 2021 Nicolas Lamirault <[email protected]> | ||
# | ||
# 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. | ||
|
||
name: 'portefaix' | ||
description: 'A GitHub Action with tools from the Kubernetes echosystem' | ||
author: 'Nicolas Lamirault' | ||
branding: | ||
icon: 'command' | ||
color: 'blue' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
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,44 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
YQ_VERSION="v4.6.1" | ||
KUSTOMIZE_VERSION="4.1.3" | ||
KUBEVAL_VERSION="0.15.0" | ||
KUBECONFORM_VERSION="v0.4.7" | ||
OPA_VERSION="v0.28.0" | ||
CONFTEST_VERSION="0.25.0" | ||
JB_VERSION="v0.4.0" | ||
|
||
|
||
mkdir -p "${GITHUB_WORKSPACE}/bin" | ||
cd "${GITHUB_WORKSPACE}/bin" | ||
|
||
curl -sL "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" -o yq | ||
chmod +x "${GITHUB_WORKSPACE}/bin/yq" | ||
|
||
kustomize_url="https://github.com/kubernetes-sigs/kustomize/releases/download" && \ | ||
curl -sL "${kustomize_url}/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" | \ | ||
tar xz | ||
chmod +x "${GITHUB_WORKSPACE}/bin/kustomize" | ||
|
||
curl -sL "https://github.com/instrumenta/kubeval/releases/download/${KUBEVAL_VERSION}/kubeval-linux-amd64.tar.gz" | \ | ||
tar xz | ||
chmod +x "${GITHUB_WORKSPACE}/bin/kubeval" | ||
|
||
curl -sL "https://github.com/yannh/kubeconform/releases/download/${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz" | \ | ||
tar xz | ||
chmod +x "${GITHUB_WORKSPACE}/bin/kubeconform" | ||
|
||
curl -sL "https://github.com/open-policy-agent/opa/releases/download/${OPA_VERSION}/opa_linux_amd64" -o opa | ||
chmod +x "${GITHUB_WORKSPACE}/bin/opa" | ||
|
||
curl -sL "https://github.com/open-policy-agent/conftest/releases/download/v${CONFTEST_VERSION}/conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz" | \ | ||
tar xz | ||
chmod +x "${GITHUB_WORKSPACE}/bin/conftest" | ||
|
||
curl -sL "https://github.com/jsonnet-bundler/jsonnet-bundler/releases/download/${JB_VERSION}/jb-linux-amd64" -o jb | ||
chmod +x "${GITHUB_WORKSPACE}/bin/jb" | ||
|
||
echo "${GITHUB_WORKSPACE}/bin" >> "${GITHUB_PATH}" | ||
echo "$RUNNER_WORKSPACE/$(basename "${GITHUB_REPOSITORY}")/bin" >> "${GITHUB_PATH}" |
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,18 @@ | ||
# Copyright (C) 2021 Nicolas Lamirault <[email protected]> | ||
# | ||
# 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. | ||
|
||
label-alias: | ||
bug: 'kind/bug' | ||
feature_request: 'kind/feature' | ||
question: 'kind/question' |
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,62 @@ | ||
# Copyright (C) 2021 Nicolas Lamirault <[email protected]> | ||
# | ||
# 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. | ||
|
||
# Labels for action/labeler | ||
|
||
area/kubernetes: | ||
- kubernetes/* | ||
- kubernetes/**/* | ||
|
||
cloud/gcp: | ||
- iac/gcp/* | ||
- iac/gcp/**/* | ||
- kubernetes/overlays/gcp/**/* | ||
|
||
cloud/aws: | ||
- iac/aws/* | ||
- iac/aws/**/* | ||
|
||
cloud/azure: | ||
- iac/azure/* | ||
- iac/azure/**/* | ||
|
||
cloud/alicloud: | ||
- iac/alicloud/* | ||
- iac/alicloud/**/* | ||
|
||
cloud/digitalocean: | ||
- iac/digitalocean/* | ||
- iac/digitalocean/**/* | ||
|
||
cloud/exoscale: | ||
- iac/exoscale/* | ||
- iac/exoscale/**/* | ||
|
||
cloud/scaleway: | ||
- iac/scaleway/* | ||
- iac/scaleway/**/* | ||
|
||
cloud/homelab: | ||
- iac/homelab/* | ||
- iac/homelab/**/* | ||
- kubernetes/overlays/k3s/homelab | ||
|
||
cloud/cicd: | ||
- iac/cicd/* | ||
- iac/cicd/**/* | ||
- kubernetes/overlays/k3s/cicd/* | ||
|
||
kind/documentation: | ||
- docs/* | ||
- docs/**/* |
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,82 @@ | ||
# Copyright (C) 2021 Nicolas Lamirault <[email protected]> | ||
# | ||
# 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. | ||
|
||
# labels to be used with /area command | ||
area: | ||
- 'kubernetes' | ||
- 'terraform' | ||
- 'ansible' | ||
- 'inspec' | ||
- 'github' | ||
|
||
kind: | ||
- 'bug' | ||
- 'documentation' | ||
- 'discussion' | ||
- 'feature' | ||
- 'question' | ||
- 'support' | ||
|
||
priority: | ||
- backlog | ||
- 'low' | ||
- 'medium' | ||
- 'high' | ||
- 'critical' | ||
|
||
status: | ||
- available | ||
- blocked | ||
- in_progress | ||
- on_hold | ||
|
||
# File globs for PR labeler | ||
# tests: | ||
# - '**/*.test.ts' | ||
|
||
'area/kubernetes': | ||
- kubernetes/* | ||
- kubernetes/**/* | ||
|
||
'cloud/gcp': | ||
- iac/gcp/* | ||
- iac/gcp/**/* | ||
|
||
'cloud/aws': | ||
- iac/aws/* | ||
- iac/aws/**/* | ||
|
||
'cloud/azure': | ||
- iac/azure/* | ||
- iac/azure/**/* | ||
|
||
'cloud/alicloud': | ||
- iac/alicloud/* | ||
- iac/alicloud/**/* | ||
|
||
'cloud/digitalocean': | ||
- iac/digitalocean/* | ||
- iac/digitalocean/**/* | ||
|
||
'cloud/exoscale': | ||
- iac/exoscale/* | ||
- iac/exoscale/**/* | ||
|
||
'cloud/scaleway': | ||
- iac/scaleway/* | ||
- iac/scaleway/**/* | ||
|
||
'kind/documentation': | ||
- docs/* | ||
- docs/**/* |
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,58 @@ | ||
# Copyright (C) 2021 Nicolas Lamirault <[email protected]> | ||
# | ||
# 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. | ||
|
||
name-template: 'v$RESOLVED_VERSION π' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
# https://gitmoji.carloscuesta.me/ | ||
categories: | ||
- title: 'π Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- 'kind/feature' | ||
- 'kind/enhancement' | ||
- title: 'π Bug Fixes' | ||
labels: | ||
- 'kind/bug' | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: 'π¨ Maintenance' | ||
labels: | ||
- 'kind/renovate' | ||
- 'dependency/flux' | ||
- 'chore' | ||
- title: 'π Documentation' | ||
labels: | ||
- 'kind/documentation' | ||
- title: 'π‘ Question' | ||
labels: | ||
- 'kind/question' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
default: patch | ||
template: | | ||
## π§ Changes | ||
$CHANGES |
Oops, something went wrong.