Skip to content

Commit

Permalink
Add HashiCorp copywrite action (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
arybolovlev authored Jan 27, 2023
1 parent 6c5d1f0 commit ec751d5
Show file tree
Hide file tree
Showing 56 changed files with 198 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2022
header_ignore = [
".github/**",
# All files within the config directory are generated automatically by the operator-sdk CLI tool
# Some files were scaffolded during the first run of the operator-sdk CLI tool and never changed
# The dev team is not working with these files they all serve a supporting role
"config/**",
]
}
25 changes: 25 additions & 0 deletions .github/workflows/hc-copywrite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "HashiCorp Copywrite"

on:
schedule:
- cron: '30 2 * * *'
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:

jobs:
copywrite:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: Install copywrite
uses: hashicorp/setup-copywrite@3ace06ad72e6ec679ea8572457b17dbc3960b8ce # v1.0.0

- name: Validate Header Compliance
run: copywrite headers --plan
1 change: 1 addition & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: "PR Labeler"

on:
pull_request_target:
branches:
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

# Build the manager binary
FROM golang:1.19 as builder
ARG TARGETOS
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha2/agentpool_helpers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package v1alpha2

import (
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha2/agentpool_types.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package v1alpha2

import (
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha2/groupversion_info.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

// Package v1alpha2 contains API Schema definitions for the app v1alpha2 API group
// +kubebuilder:object:generate=true
// +groupName=app.terraform.io
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha2/module_helpers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package v1alpha2

import (
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha2/module_types.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package v1alpha2

import (
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha2/workspace_helpers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package v1alpha2

import (
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha2/workspace_types.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package v1alpha2

import (
Expand Down
3 changes: 3 additions & 0 deletions charts/terraform-cloud-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: v2
name: terraform-cloud-operator
description: A Helm chart for HashiCorp Terraform Cloud Kubernetes Operator.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down
3 changes: 3 additions & 0 deletions charts/terraform-cloud-operator/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/terraform-cloud-operator/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: v1
data:
controller_manager_config.yaml: |
Expand Down
3 changes: 3 additions & 0 deletions charts/terraform-cloud-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/terraform-cloud-operator/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/terraform-cloud-operator/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/terraform-cloud-operator/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: v1
kind: Service
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/terraform-cloud-operator/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/terraform-cloud-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

replicaCount: 2

operator:
Expand Down
3 changes: 3 additions & 0 deletions controllers/agentpool_controller.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/agentpool_controller_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/agentpool_controller_tokens.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/consts.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import "time"
Expand Down
3 changes: 3 additions & 0 deletions controllers/helpers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/helpers_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/module_controller.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/module_controller_outputs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/module_controller_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/module_controller_workspace.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_agents.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_agents_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_outputs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_outputs_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_remote_state_sharing.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_remote_state_sharing_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_run_triggers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_run_triggers_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_sshkey.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_sshkey_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_tags.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_tags_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_team_access.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_team_access_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_variables.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
3 changes: 3 additions & 0 deletions controllers/workspace_controller_variables_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package controllers

import (
Expand Down
Loading

0 comments on commit ec751d5

Please sign in to comment.