b21a7d60dc
release / Build and publish release (push) Successful in 1m14s
Remote includes (include: remote: https://...) were previously skipped silently in the resolver and rendered as unexpanded leaf nodes in the graph. Changes: - fetcher.FetchURL: new shared unauthenticated HTTP GET helper - resolver: resolveRemoteInclude fetches the URL, parses YAML, sets job origin to the URL string, recursively resolves sub-includes, and emits a warning on failure (lint continues on the rest of the pipeline) - graph: recurseRemote fetches the URL, captures direct job names, and recurses into sub-includes so remote nodes expand like local ones Adds testdata/includes_remote.yml fixture. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
116 lines
3.5 KiB
YAML
116 lines
3.5 KiB
YAML
version: "3"
|
|
|
|
vars:
|
|
BINARY: glint
|
|
GO: /usr/local/go/bin/go
|
|
|
|
tasks:
|
|
default:
|
|
desc: List available tasks
|
|
cmd: task --list
|
|
|
|
build:
|
|
desc: Build the glint binary
|
|
cmds:
|
|
- "{{.GO}} build -o {{.BINARY}} ./cmd/glint/..."
|
|
sources:
|
|
- "**/*.go"
|
|
- go.mod
|
|
generates:
|
|
- "{{.BINARY}}"
|
|
|
|
test:
|
|
desc: Run Go unit tests
|
|
cmd: "{{.GO}} test ./..."
|
|
|
|
validate:
|
|
desc: Run glint against all testdata fixtures
|
|
deps: [build]
|
|
cmds:
|
|
- cmd: ./{{.BINARY}} check testdata/valid.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check testdata/extends.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check testdata/keywords_valid.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check testdata/invalid.yml
|
|
ignore_error: true
|
|
- cmd: ./{{.BINARY}} check testdata/needs.yml
|
|
ignore_error: true
|
|
- cmd: ./{{.BINARY}} check testdata/needs_cycle.yml
|
|
ignore_error: true
|
|
- cmd: ./{{.BINARY}} check testdata/keywords_invalid.yml
|
|
ignore_error: true
|
|
- cmd: ./{{.BINARY}} check testdata/includes_remote.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check testdata/includes_project.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check testdata/includes_component.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check testdata/script_multiline.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check testdata/context_rules.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check --branch main testdata/context_rules.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check --branch develop testdata/context_rules.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check --branch feat/my-feature testdata/context_rules.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check --tag v1.0.0 testdata/context_rules.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check samba-testdata/.gitlab-ci.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check samba-testdata/.gitlab-ci-coverage.yml
|
|
ignore_error: false
|
|
- cmd: ./{{.BINARY}} check samba-testdata/.gitlab-ci-private.yml
|
|
ignore_error: false
|
|
|
|
lint-go:
|
|
desc: Run go vet on all packages
|
|
cmd: "{{.GO}} vet ./..."
|
|
|
|
ci:
|
|
desc: Full CI check — vet, test, build, validate
|
|
cmds:
|
|
- task: lint-go
|
|
- task: test
|
|
- task: build
|
|
- task: validate
|
|
|
|
build-windows:
|
|
desc: Build the glint binary for Windows x64 (requires a tagged commit)
|
|
vars:
|
|
TAG:
|
|
sh: git describe --tags --exact-match
|
|
preconditions:
|
|
- sh: git describe --tags --exact-match
|
|
msg: "Current commit is not tagged — Windows build requires a git tag"
|
|
cmds:
|
|
- "GOOS=windows GOARCH=amd64 {{.GO}} build -o {{.BINARY}}-{{.TAG}}.exe ./cmd/glint/..."
|
|
sources:
|
|
- "**/*.go"
|
|
- go.mod
|
|
generates:
|
|
- "{{.BINARY}}-{{.TAG}}.exe"
|
|
|
|
build-linux:
|
|
desc: Build the glint binary for Linux x64 (requires a tagged commit)
|
|
vars:
|
|
TAG:
|
|
sh: git describe --tags --exact-match
|
|
preconditions:
|
|
- sh: git describe --tags --exact-match
|
|
msg: "Current commit is not tagged — Linux build requires a git tag"
|
|
cmds:
|
|
- "GOOS=linux GOARCH=amd64 {{.GO}} build -o {{.BINARY}}-{{.TAG}}-linux-amd64 ./cmd/glint/..."
|
|
sources:
|
|
- "**/*.go"
|
|
- go.mod
|
|
generates:
|
|
- "{{.BINARY}}-{{.TAG}}-linux-amd64"
|
|
|
|
clean:
|
|
desc: Remove build artifacts
|
|
cmd: rm -f {{.BINARY}} {{.BINARY}}-*.exe {{.BINARY}}-*-linux-amd64
|