Skip to content

Commit 1e7815f

Browse files
inditextechci-sync[bot]ivanasabienriqueavindi
authored
chore(ci-governance): adopt Go profile (#65)
* chore(ci-governance): adopt Go profile Governance-Provenance: hmac-sha256:66122258fb6139def94780f861b7a625ac4eda99a83521653d53b95c898f07c2 * chore(ci-governance): remove legacy PR-verify workflow Superseded by the governed pr-verify.yml; its identical filename (differing only by case) was silently shadowing the governed workflow on GitHub's Actions indexer, preventing it from ever registering or running. Signed-off-by: Ivan Alvarez Sabin <ivanasabi@ext.inditex.com> * chore(ci-governance): remove legacy go-test workflow Fully duplicated by the governed code-gomod_go-PR_verify.yml (job "Code / Verify", confirmed green). Signed-off-by: Ivan Alvarez Sabin <ivanasabi@ext.inditex.com> * chore(ci-governance): add REUSE coverage for .sync-exclude ADOPT added the root .sync-exclude file, which had no REUSE annotation coverage (428/429 files). Cover it under the existing developer-tools-and-util-files annotation group. Signed-off-by: Ivan Alvarez Sabin <ivanasabi@ext.inditex.com> * chore(ci-governance): add NOTICE file Repo Linter's notice-file-exists rule fails without it. Apache-2.0 boilerplate with a literal 2025 copyright year, matching this repo's existing REUSE.toml convention. Signed-off-by: Ivan Alvarez Sabin <ivanasabi@ext.inditex.com> * chore(ci-governance): add .gitattributes to fix Linguist misdetection Repo Linter's python-package-metadata-exists rule fires because Linguist classifies the repo as containing a Python package due to a single helper script (hack/tilt/scripts/prepare_values.py) used only by local Tilt dev tooling, not a real Python package. Marking it linguist-detectable=false removes the false-positive language classification without touching the script itself. Signed-off-by: Ivan Alvarez Sabin <ivanasabi@ext.inditex.com> * chore(ci-governance): add REUSE coverage for NOTICE and .gitattributes Both files were just added and had no REUSE annotation coverage. Cover them under the existing developer-tools-and-util-files annotation group, alongside .sync-exclude. Signed-off-by: Ivan Alvarez Sabin <ivanasabi@ext.inditex.com> --------- Signed-off-by: Ivan Alvarez Sabin <ivanasabi@ext.inditex.com> Co-authored-by: inditextechci-sync[bot] <312492039+inditextechci-sync[bot]@users.noreply.github.com> Co-authored-by: Ivan Alvarez Sabin <ivanasabi@ext.inditex.com> Co-authored-by: Ivan Alvarez Sabin <71872287+ivanasabi@users.noreply.github.com> Co-authored-by: enriqueavi <146724635+enriqueavindi@users.noreply.github.com>
1 parent 98c1cc0 commit 1e7815f

19 files changed

Lines changed: 939 additions & 144 deletions

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hack/tilt/scripts/prepare_values.py linguist-detectable=false

‎.github/ISSUE_TEMPLATE/1-bug.yml‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# SPDX-FileCopyrightText: 2026 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
2+
# SPDX-License-Identifier: Apache-2.0
3+
name: Bug Report
4+
description: Report a reproducible bug
5+
title: '[Bug] '
6+
labels: ['bug']
7+
assignees: []
8+
9+
body:
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: What's the problem?
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: steps
20+
attributes:
21+
label: Steps to Reproduce
22+
description: How can we reproduce the bug?
23+
placeholder: |
24+
1. Go to ...
25+
2. Run ...
26+
3. See error
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: expected
32+
attributes:
33+
label: Expected Behavior
34+
validations:
35+
required: false
36+
37+
- type: input
38+
id: version
39+
attributes:
40+
label: Version / Environment
41+
placeholder: "e.g. v0.3.2, Node 18, macOS"
42+
validations:
43+
required: false
44+
45+
- type: textarea
46+
id: notes
47+
attributes:
48+
label: Additional context or logs
49+
validations:
50+
required: false
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# SPDX-FileCopyrightText: 2026 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
2+
# SPDX-License-Identifier: Apache-2.0
3+
name: Feature Request
4+
description: Suggest a feature or improvement
5+
title: '[Feature] '
6+
labels: ['enhancement']
7+
assignees: []
8+
9+
body:
10+
- type: textarea
11+
id: proposal
12+
attributes:
13+
label: Feature description
14+
description: What would you like to see added or changed?
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: motivation
20+
attributes:
21+
label: Use case or motivation
22+
description: Why is this feature useful?
23+
24+
- type: dropdown
25+
id: contribution
26+
attributes:
27+
label: Would you like to work on this?
28+
options:
29+
- Yes, I'd like to open a PR
30+
- Maybe, I'd need help
31+
- No, I'm just proposing it
32+
validations:
33+
required: true

‎.github/ISSUE_TEMPLATE/3-other.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-FileCopyrightText: 2026 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
2+
# SPDX-License-Identifier: Apache-2.0
3+
name: Other
4+
description: Use this for anything that doesn't fit the other templates
5+
title: '[Other] '
6+
labels: ['discussion']
7+
assignees: []
8+
9+
body:
10+
- type: textarea
11+
id: context
12+
attributes:
13+
label: Context or topic
14+
description: Briefly explain what this is about — question, idea, feedback, etc.
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: details
20+
attributes:
21+
label: Details or background
22+
description: Add any supporting info, links, logs, or notes that may be useful.
23+
placeholder: |
24+
Example:
25+
- I'm wondering if we should improve X
26+
- This tool might be useful for Y
27+
- We discussed this in meeting Z
28+
29+
- type: dropdown
30+
id: nextstep
31+
attributes:
32+
label: What are you hoping to do next?
33+
options:
34+
- Just opening this for awareness
35+
- Looking for input before starting work
36+
- Need help or advice
37+
- Happy to open a PR based on feedback

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2026 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
2+
# SPDX-License-Identifier: Apache-2.0
3+
blank_issues_enabled: false

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!--
2-
SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
3-
SPDX-FileContributor: enriqueavi@inditex.com
2+
SPDX-FileCopyrightText: 2026 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
43
54
SPDX-License-Identifier: Apache-2.0
65
-->
@@ -19,4 +18,4 @@ Briefly describe the purpose of this PR and what changes it introduces.
1918

2019
## Additional context
2120

22-
Add any screenshots, test output, or notes for reviewers here.
21+
Add any screenshots, test output, or notes for reviewers here.

‎.github/inditextech-ci-go.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"artifacts": "none",
3+
"schema_version": 1,
4+
"sonar": true,
5+
"verify_command": "make build test lint",
6+
"working_directory": "."
7+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"configuration": {
3+
"development_flow": "trunk-based",
4+
"outputs": [],
5+
"parameters": {
6+
"artifacts": "none",
7+
"sonar": true,
8+
"verify_command": "make build test lint",
9+
"working_directory": "."
10+
}
11+
},
12+
"creation_year": 2026,
13+
"integrity": {
14+
"algorithm": "hmac-sha256",
15+
"signature": "b9e6b75852c23cbbed7265826d4808864092fa5f3c232af9e14f617ae71bf96e"
16+
},
17+
"managed_by": "InditexTech CI governance",
18+
"managed_paths": {
19+
".github/ISSUE_TEMPLATE/1-bug.yml": "cd4dad3f32fe707e06324790a2fe2c25829c55566de2b459d744e785b36e1205",
20+
".github/ISSUE_TEMPLATE/2-feature.yml": "ebb92730d6c01641d055f97ac094cbe07f88fac24be9b689ddf26e47e7bda863",
21+
".github/ISSUE_TEMPLATE/3-other.yml": "5a839b39a98704036210dee498146f51bd5a6c057228685680e02004ff063a9a",
22+
".github/ISSUE_TEMPLATE/config.yml": "10e5dee4d49aa9e7792ceb4c986160c61f95da1ba00a64bf06e5f1f636cd17ec",
23+
".github/PULL_REQUEST_TEMPLATE.md": "23a0b0ac79a9020ccac9c013582a01f86e2df2ae7f914673583b9a3368313041",
24+
".github/inditextech-ci-go.json": "d854041fe302eab86b99a4ee25414027fda743af14f26db7e8883ab90f60c5fd",
25+
".github/workflows/code-gomod_go-PR_verify.yml": "7145f586962f35425afbce4cdd00c61f0447d25f1c22ea48c8131f42343f893e",
26+
".github/workflows/code-gomod_go-sonarcloud-analysis.yml": "65b682f75a2fc0d9e928bc4816d79e1ff6aa68830c47148e23db9943f3a79c10",
27+
".github/workflows/codeql.yml": "a7ff83d8f89a5e02bfd729939a51a0a512a0f2f3fa7ddf9dc688dfdf41937748",
28+
".github/workflows/pr-verify.yml": "f52295fbfe81578c0a6459d8b384be569933ac78d32fff370932a8dec6943e46",
29+
".github/workflows/push-verify.yml": "217097070d0fdef329eae1a7187806a4623d692ce467ca8f1f9a7f56dddb29ed",
30+
"repolinter.json": "0efb305c47a63f03c488a34906fc2d5471c84145c2ff553f2aacf3a41b92e1a1"
31+
},
32+
"managed_variables": {
33+
"DEVELOPMENT_FLOW": "trunk-based-development",
34+
"WORKING_DIRECTORY": "."
35+
},
36+
"profile": "go",
37+
"repository_id": 1011107741,
38+
"retained_paths": {
39+
"CODE_OF_CONDUCT.md": "97188ec333ef1e7e4b8811a41e714a922460bf1a07dabf8d9542dd2def6e0af2",
40+
"CONTRIBUTING.md": "f9c34489e076248247476a0dc9b7ab07fba014dc2c5d82b9ef246546f6c46dab",
41+
"SECURITY.md": "fcaf4cc7669737e9025dafe551a39190dbc3d43b3b5b58e803f5a2a49f39d8f9"
42+
},
43+
"schema_version": 2,
44+
"source_digests": {
45+
"base": "09dc9b8d0dcb29288bdb6adeb49cea193b4b79f8de78e55eed00c1c669b5ab5a",
46+
"go": "963229e52884cccc1de8b2251ce7745a8fa5e36970553eeb513a9d1f914d4410"
47+
}
48+
}

‎.github/workflows/PR-verify.yml‎

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# SPDX-FileCopyrightText: 2026 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: code-gomod-go-PR-verify
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, ready_for_review, reopened]
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: code-gomod-go-pr-verify-${{ github.repository }}-${{ github.event.pull_request.number }}
15+
cancel-in-progress: true
16+
17+
env:
18+
WORKING_DIRECTORY: ${{ vars.WORKING_DIRECTORY }}
19+
# The project-owned verify command travels in the managed component descriptor,
20+
# never in an Actions variable: the repo owns its build, governance owns only the
21+
# envelope that invokes it.
22+
COMPONENT_DESCRIPTOR: .github/inditextech-ci-go.json
23+
ASDF_BRANCH_VERSION: '0.18.0'
24+
25+
jobs:
26+
verify:
27+
name: Code / Verify
28+
runs-on: ubuntu-24.04
29+
timeout-minutes: 30
30+
steps:
31+
- name: Check out pull request head
32+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
33+
with:
34+
fetch-depth: 0
35+
persist-credentials: false
36+
ref: ${{ github.event.pull_request.head.sha }}
37+
38+
- name: Read governed tool versions
39+
id: tool-versions
40+
working-directory: ${{ env.WORKING_DIRECTORY }}
41+
shell: bash
42+
run: |
43+
set -euo pipefail
44+
resolved=""
45+
if [[ -f .tool-versions ]]; then
46+
# Validate only real "<plugin> <version>" lines; asdf allows # comments (SPDX/REUSE) and blank lines.
47+
if grep -vE '^[[:space:]]*(#|$)' .tool-versions | grep -qvE '^[a-zA-Z0-9_-]+ [a-zA-Z0-9._+-]+$'; then
48+
echo "::error title=Invalid tool-versions::${WORKING_DIRECTORY}/.tool-versions is malformed."
49+
exit 1
50+
fi
51+
# Emit only the governed golang pin so asdf ignores project extra pins (e.g. kind).
52+
resolved="$(grep -E '^golang ' .tool-versions || true)"
53+
fi
54+
if [[ -z "$resolved" ]]; then
55+
# No committed golang pin: derive it from the module's own go directive so the
56+
# governed lane follows the product's declared toolchain instead of failing or
57+
# clamping it. A committed pin always wins over the derived one.
58+
if [[ ! -f go.mod ]]; then
59+
echo "::error title=Missing go toolchain::${WORKING_DIRECTORY} has no golang pin in .tool-versions and no go.mod to derive one from."
60+
exit 1
61+
fi
62+
version="$(sed -nE 's/^toolchain[[:space:]]+go([0-9]+\.[0-9]+(\.[0-9]+)?)[[:space:]]*$/\1/p' go.mod | head -n 1)"
63+
if [[ -z "$version" ]]; then
64+
version="$(sed -nE 's/^go[[:space:]]+([0-9]+\.[0-9]+(\.[0-9]+)?)[[:space:]]*$/\1/p' go.mod | head -n 1)"
65+
fi
66+
if [[ -z "$version" ]]; then
67+
echo "::error title=Missing go toolchain::${WORKING_DIRECTORY}/go.mod declares no usable go version."
68+
exit 1
69+
fi
70+
# asdf installs an exact patch release; a two-part directive (go 1.21) means .0.
71+
if [[ "$version" != *.*.* ]]; then
72+
version="${version}.0"
73+
fi
74+
resolved="golang ${version}"
75+
echo "::notice title=Derived go toolchain::Using ${resolved} from ${WORKING_DIRECTORY}/go.mod."
76+
fi
77+
{
78+
echo "tool_versions<<EOF"
79+
echo "$resolved"
80+
echo "EOF"
81+
} >> "$GITHUB_OUTPUT"
82+
83+
- name: Set up asdf-managed Go
84+
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47 # v4.0.1
85+
with:
86+
tool_versions: ${{ steps.tool-versions.outputs.tool_versions }}
87+
asdf_version: ${{ env.ASDF_BRANCH_VERSION }}
88+
89+
- name: Resolve governed verify command
90+
id: descriptor
91+
shell: bash
92+
run: |
93+
set -euo pipefail
94+
if [[ ! -f "$COMPONENT_DESCRIPTOR" ]]; then
95+
echo "::error title=Missing descriptor::${COMPONENT_DESCRIPTOR} not found."
96+
exit 1
97+
fi
98+
# The descriptor is governance-owned and schema-validated; verify_command
99+
# always resolves, but fail closed if it is somehow blank.
100+
verify_command="$(jq -er '.verify_command // "make verify"' "$COMPONENT_DESCRIPTOR")"
101+
if [[ -z "$verify_command" ]]; then
102+
echo "::error title=Empty verify command::descriptor verify_command must not be blank."
103+
exit 1
104+
fi
105+
{
106+
echo "verify_command<<EOF"
107+
echo "$verify_command"
108+
echo "EOF"
109+
} >> "$GITHUB_OUTPUT"
110+
111+
- name: Verify and test
112+
working-directory: ${{ env.WORKING_DIRECTORY }}
113+
shell: bash
114+
env:
115+
VERIFY_COMMAND: ${{ steps.descriptor.outputs.verify_command }}
116+
run: |
117+
set -euo pipefail
118+
# The project owns its build; governance only invokes the governed
119+
# verify_command inside the pinned working directory.
120+
bash -c "$VERIFY_COMMAND"

0 commit comments

Comments
 (0)