Formae plugin for managing GitLab CI/CD resources.
| Resource Type | Description |
|---|---|
GitLab::Project::Variable |
CI/CD variables (with masked/protected support) |
GitLab::Project::File |
Repository files (.gitlab-ci.yml, etc.) |
GitLab::Project::Environment |
Deployment environments |
GitLab::Project::Pipeline |
.gitlab-ci.yml pipeline declared as a typed Pkl resource |
make installConfigure a GitLab target in your Forma file:
new formae.Target {
label = "my-gitlab-target"
namespace = "GitLab"
config = new gitlab.Config {
group = "my-group"
project = "my-project"
}
}Authentication uses the following chain (in order):
GITLAB_TOKENenvironment variableglabCLI config file (~/Library/Application Support/glab-cli/config.ymlor~/.config/glab-cli/config.yml)
See examples/ for usage patterns:
smoke-test.pkl- Simple variable creationinfra-to-app/- Full CI/CD pipeline with Azure credentials, environments, and deploy/destroy stages
make build # Build plugin
make test # Run tests
make lint # Run golangci-lint
make install # Install locally
make install-dev # Install as v0.0.0 (for debug builds)
make gen-pkl # Resolve PKL dependencies
make verify-schema # Validate Pkl schemasRun against a real GitLab project:
export GITLAB_TOKEN=glpat-...
export GITLAB_TEST_GROUP=my-group
export GITLAB_TEST_PROJECT=my-test-project
make conformance-testTo run conformance against a local formae build (e.g. an unreleased version), point the harness at the binary:
export FORMAE_BINARY=/path/to/formae
make conformance-testGITLAB_TEST_GROUP=my-group GITLAB_TEST_PROJECT=my-test-project ./scripts/ci/clean-environment.shFSL-1.1-ALv2