Files
glint/testdata/keywords_valid.yml
T
k3nnyandClaude Sonnet 4.6 986162d270
ci / vet, staticcheck, test, build (push) Successful in 8m44s
release / Build and publish release (push) Successful in 9m52s
feat(linter): add GL046-GL049 rules, AND-group support, and GL032 fix
- GL046: validate image/service pull_policy values (always, if-not-present, never)
- GL047: error when a variables.options default value is not in the options list
- GL048: error on unrecognised trigger.forward keys
- GL049: validate rules[n].allow_failure (bool or {exit_codes:} map)
- Parse and evaluate workflow.rules/job.rules nested-array AND-groups; crash
  on !!seq nodes is fixed; all members of a group must match for it to fire
- Add workflow.name and workflow.auto_cancel fields to Workflow struct
- Fix GL032 false positive: variables declared in any workflow rule's variables:
  block no longer trigger an undeclared-variable warning in sibling workflow
  rule if: expressions
- Add Windows ARM64 release build target (task build-windows-arm64)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-30 22:44:22 +02:00

109 lines
1.7 KiB
YAML

stages:
- build
- test
- release
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
- when: never
default:
tags:
- docker
variables:
GO_VERSION: "1.26"
DEPLOY_ENV:
value: staging
options:
- staging
- production
- review
build-job:
stage: build
image:
name: golang:1.26
entrypoint: [""]
pull_policy: if-not-present
script:
- go build ./...
artifacts:
paths:
- bin/
when: on_success
expire_in: 1 week
cache:
key: go-modules
paths:
- .go/pkg/mod
policy: pull-push
when: on_success
retry: 2
interruptible: true
resource_group: build-group
test-job:
stage: test
script:
- go test ./...
coverage: '/coverage: \d+\.\d+%/'
allow_failure:
exit_codes: [1, 2]
parallel: 4
needs:
- build-job
dependencies:
- build-job
retry:
max: 2
when:
- script_failure
- runner_system_failure
release-job:
stage: release
script:
- echo "creating release"
release:
tag_name: $CI_COMMIT_TAG
description: "Release $CI_COMMIT_TAG"
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
environment:
name: production
url: https://example.com
action: start
when: on_success
.trigger-valid:
trigger:
include:
- artifact: child.yml
job: build
forward:
pipeline_variables: true
yaml_variables: false
.rules-allow-failure-valid:
script: echo ok
rules:
- if: $CI_COMMIT_BRANCH
allow_failure: true
- if: $CI_COMMIT_TAG
allow_failure:
exit_codes: [1, 2]
.template:
before_script:
- echo "before"
tags:
- docker
inherit:
default: false
variables:
- GO_VERSION