Skip to content

Commit

Permalink
Update Copyright headers, add workflow to enforce (#4764)
Browse files Browse the repository at this point in the history
* Add boilerplates for go,bash,yaml

This commit adds the boilerplates for the code. Included are headers
for go, yaml and shell scripts

Signed-off-by: Adolfo García Veytia (puerco) <[email protected]>

* Add license plate workflow

This commit adds a workflow to check for the license boilerplates
using chainguard-dev/action/boilerplates

Signed-off-by: Adolfo García Veytia (puerco) <[email protected]>

* Update copyright headers on all the codebase

This commit modifies all the go code and yaml files to update the copyright headers
to credit "The Minder Authors" and use SPDX License identifiers instead of text.

Signed-off-by: Adolfo García Veytia (puerco) <[email protected]>

* Fix mindpak hashes in tests

Signed-off-by: Adolfo García Veytia (puerco) <[email protected]>

* Temporarily remove migration check

This commit temporarily removes the migration check as we are altering all the files.
Once the copyright headers are updated, this PR will be reverted.

Signed-off-by: Adolfo García Veytia (puerco) <[email protected]>

* Make gen

---------

Signed-off-by: Adolfo García Veytia (puerco) <[email protected]>
  • Loading branch information
puerco authored Oct 17, 2024
1 parent cb3f28d commit 7a669b5
Show file tree
Hide file tree
Showing 949 changed files with 2,286 additions and 12,457 deletions.
4 changes: 4 additions & 0 deletions .boilerplates/boilerplate.css.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
SPDX-FileCopyrightText: Copyright YYYY The Minder Authors
SPDX-License-Identifier: Apache-2.0
*/
2 changes: 2 additions & 0 deletions .boilerplates/boilerplate.go.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// SPDX-FileCopyrightText: Copyright YYYY The Minder Authors
// SPDX-License-Identifier: Apache-2.0
4 changes: 4 additions & 0 deletions .boilerplates/boilerplate.html.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!--
SPDX-FileCopyrightText: Copyright YYYY The Minder Authors
SPDX-License-Identifier: Apache-2.0
-->
2 changes: 2 additions & 0 deletions .boilerplates/boilerplate.sh.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-FileCopyrightText: Copyright YYYY The Minder Authors
# SPDX-License-Identifier: Apache-2.0
2 changes: 2 additions & 0 deletions .boilerplates/boilerplate.sql.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- SPDX-FileCopyrightText: Copyright YYYY The Minder Authors
-- SPDX-License-Identifier: Apache-2.0
2 changes: 2 additions & 0 deletions .boilerplates/boilerplate.yaml.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-FileCopyrightText: Copyright YYYY The Minder Authors
# SPDX-License-Identifier: Apache-2.0
2 changes: 2 additions & 0 deletions .boilerplates/boilerplate.yml.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-FileCopyrightText: Copyright YYYY The Minder Authors
# SPDX-License-Identifier: Apache-2.0
17 changes: 2 additions & 15 deletions .clusterfuzzlite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# Copyright 2024 Stacklok, Inc.
#
# 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.
#
################################################################################
# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

FROM gcr.io/oss-fuzz-base/base-builder-go
COPY . $SRC/minder
Expand Down
17 changes: 2 additions & 15 deletions .clusterfuzzlite/build.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
#!/bin/bash -eu
# Copyright 2024 Stacklok, Inc.
#
# 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.
#
################################################################################
# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

# Download dependency and let the Go package manager do all the work
printf "package main\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > ./cmd/cli/register.go
Expand Down
3 changes: 3 additions & 0 deletions .clusterfuzzlite/project.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

language: go
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: Report a bug
description: Tell us about a bug or issue you may have identified.
title: "Provide a general summary of the issue"
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

contact_links:
- name: Ask the community
url: https://discord.com/invite/RkzVuTp3WK
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: Feature request
description: Suggest new or updated features to include in Minder.
title: "Suggest a new feature"
Expand Down
16 changes: 2 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#
# Copyright 2023 Stacklok, Inc.
#
# 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.
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

version: 2
updates:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/boilerplates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# SPDX-FileCopyrightText: Copyright 2024 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: Boilerplate

on:
pull_request:
branches: [ 'main', 'release-*' ]

jobs:

check:
name: Boilerplate Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
extension:
- go
- sh
- yaml
- yml
- html
- css

include:
- extension: go
language: Go
- extension: sh
language: Bash
- extension: yaml
language: YAML
- extension: yml
language: YAML
- extension: html
language: HTML
- extension: css
language: CSS
- extension: sql
language: SQL

steps:
- name: Check out code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- uses: chainguard-dev/actions/boilerplate@main
with:
extension: ${{ matrix.extension }}
language: ${{ matrix.language }}
exclude: "/mock/|internal/db/|client.gen.go|.pb(.gw)?.go|docs/docs/|internal/auth/keycloak/client/"
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

on:
workflow_call:
jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/chart-publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

# Post-submit and daily build and publish of the Helm chart and Docker container
# This is a separate workflow than image-build.yml because image-build.yml is
# run in the PR context, and those runs aren't allowed package:write permissions if
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: ClusterFuzzLite PR fuzzing
on:
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/compose-migrate.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

# This test verifies that the docker-compose.yml file is valid and that the
# containers can be started and stopped. It also verifies the database migrations.
name: Compose Migrate test
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: Deploy docs to GitHub Pages
on:
workflow_dispatch:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/generation.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: Code Generation
on:
push:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

on:
workflow_call: {}
jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

on:
workflow_call:
jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: Lint
on:
workflow_call:
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#
# Copyright 2023 Stacklok, Inc.
#
# 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.
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

# These set of workflows run on every push to the main branch
name: Main
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/migrate-touch.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: Pull Request Validation
on:
pull_request:
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#
# Copyright 2023 Stacklok, Inc.
#
# 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.
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

# These set of workflows run on every pull request
name: PR
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
#
# Copyright 2023 Stacklok, Inc.
#
# 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.
#
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

# This workflow compiles your minder server and client using a SLSA3 compliant
# build and then verifies the provenance of the built artifacts.
# It releases the following architectures: amd64, arm64, and armv7 on Linux,
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

on:
workflow_call:
jobs:
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/stalebot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#
# Copyright 2023 Stacklok, Inc.
#
# 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.
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

# This action closes stale issues and PRs that have had no activity for a period of time.
# Issues:
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/tags.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#
# Copyright 2023 Stacklok, Inc.
#
# 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.
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: Tags

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-deploy-doc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

name: Test documentation
on:
workflow_call:
Expand Down
Loading

0 comments on commit 7a669b5

Please sign in to comment.