Skip to content

Commit

Permalink
Merge pull request #3 from nlamirault/feat/provider-2.10.0
Browse files Browse the repository at this point in the history
Refactoring Terraform code and Github Actions
  • Loading branch information
nlamirault authored Aug 20, 2021
2 parents a6c28e7 + f379345 commit 13b03ee
Show file tree
Hide file tree
Showing 24 changed files with 802 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .github/issue_label_bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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'
35 changes: 35 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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/**/*

area/gcp:
- iac/gcp/*
- iac/gcp/**/*

area/aws:
- iac/aws/*
- iac/aws/**/*

area/azure:
- iac/azure/*
- iac/azure/**/*

kind/documentation:
- docs/*
- docs/**/*
62 changes: 62 additions & 0 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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:
- 'gcp'
- 'aws'
- 'azure'
- 'kubernetes'

kind:
- 'documentation'
- 'discussion'
- 'feature'
- 'question'

priority:
- 'low'
- 'medium'
- 'high'
- 'critical'

status:
- available
- blocked
- in_progress
- on_hold

# File globs for PR labeler
# tests:
# - '**/*.test.ts'

'area/kubernetes':
- kubernetes/*
- kubernetes/**/*

'area/gcp':
- iac/gcp/*
- iac/gcp/**/*

'area/aws':
- iac/aws/*
- iac/aws/**/*

'area/azure':
- iac/azure/*
- iac/azure/**/*

'kind/documentation':
- docs/*
- docs/**/*
59 changes: 59 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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:
- 'area/renovate'
- '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
84 changes: 84 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"extends": [
"config:base",
":gitSignOff"
],
"enabled": true,
"timezone": "Europe/Paris",
"dependencyDashboard": true,
"dependencyDashboardTitle": "Renovate Dashboard",
// "gitAuthor": "Nicolas Lamirault <nlamirault@users.noreply.github.com>",
// "commitBody": "Signed-off-by: Nicolas Lamirault <nlamirault@users.noreply.github.com>",
// Do not notify on closed unmerged PRs
"suppressNotifications": ["prIgnoreNotification"],
// Do not rebase PRs
"rebaseWhen": "conflicted",
"assignees": ["@nlamirault"],
"reviewersFromCodeOwners": true,
// "labels": ["kind/renovate"],
"packageRules": [
// Labels for Terraform
{
"datasources": ["terraform", "terraform-version", "terraform-provider", "terraform-module"],
"updateTypes": ["major"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "area/terraform", "dependency/terraform", "priority/high", "size/xs"]
},
{
"datasources": ["terraform", "terraform-version", "terraform-provider", "terraform-module"],
"updateTypes": ["minor"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "area/terraform", "dependency/terraform", "priority/medium", "size/xs"]
},
{
"datasources": ["terraform", "terraform-version", "terraform-provider", "terraform-module"],
"updateTypes": ["patch"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "area/terraform", "dependency/terraform", "priority/low", "size/xs"]
},
{
"matchPackageNames": ["hashicorp/terraform"],
"matchUpdateTypes": ["major"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "area/terraform", "dependency/terraform", "priority/high", "size/xs"]
},
{
"matchPackageNames": ["hashicorp/terraform"],
"matchUpdateTypes": ["minor"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "area/terraform", "dependency/terraform", "priority/medium", "size/xs"]
},
{
"matchPackageNames": ["hashicorp/terraform"],
"matchUpdateTypes": ["patch"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "area/terraform", "dependency/terraform", "priority/low", "size/xs"]
},
// Labels for Docker
{
"datasources": ["docker"],
"updateTypes": ["major"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "dependency/docker", "priority/high", "size/xs"]
},
{
"datasources": ["docker"],
"updateTypes": ["minor"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "dependency/docker", "priority/medium", "size/xs"]
},
{
"datasources": ["docker"],
"updateTypes": ["patch"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "dependency/docker", "priority/low", "size/xs"]
},
// Labels for Github Actions
{
"datasources": ["action"],
"updateTypes": ["major"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "area/github", "dependency/github", "priority/high", "size/xs"]
},
{
"datasources": ["action"],
"updateTypes": ["minor"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "area/github", "dependency/github", "priority/medium", "size/xs"]
},
{
"datasources": ["action"],
"updateTypes": ["patch"],
"labels": ["kind/renovate", "lifecycle/active", "status/review_needed", "area/github", "dependency/github", "priority/low", "size/xs"]
},
]
}
32 changes: 32 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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.

# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- security fix
- security vulnerability
# Label to use when marking an issue as stale
staleLabel: lifecycle/stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
30 changes: 30 additions & 0 deletions .github/workflows/draft-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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: Project / Draft PR Labels

on:
pull_request:
types: [opened, ready_for_review]

jobs:
triage:
runs-on: ubuntu-latest
steps:
- name: label swapping
uses: jinmayamashita/ready-for-review@1.0.0
with:
in-progress-label: 'status/in_progress'
ready-for-review-label: 'status/review_needed'
repo-token: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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: Project / Pre-commit

# on:
# pull_request:
# push:
# branches: [master]

# jobs:
# pre-commit:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# - uses: pre-commit/action@v2.0.0
39 changes: 39 additions & 0 deletions .github/workflows/prow-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (C) 2021 Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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: "Label PRs from globs"
# on:
# schedule:
# - cron: "0 * * * *"

# jobs:
# execute:
# runs-on: ubuntu-latest
# steps:
# - uses: jpmcb/prow-github-actions@v1.1.1
# with:
# jobs: 'pr-labeler'
# github-token: "${{ secrets.GITHUB_TOKEN }}"

name: Prow / Pull Request Labeler
on:
- pull_request_target

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Loading

0 comments on commit 13b03ee

Please sign in to comment.