summaryrefslogtreecommitdiff
path: root/Gopkg.lock
AgeCommit message (Collapse)AuthorFilesLines
2018-12-10Use JSON as canonical config formatTyler Cipriani1-3/+45
Uses the github.com/ghodss/yaml library to convert YAML to JSON before unmarshaling for the purposes of supporting YAML and JSON input while converting to only support JSON internally. Bug: T207694 Change-Id: I00668014907e9ea54917f5d5067cac08d0668053
2018-03-19Allow for configuration policiesDan Duvall1-3/+15
Summary: Implements a rough interface for validating configuration against arbitrary policy rules. Policies are provided as YAML and passed via the command line as file paths or remote URIs. The format of policies is: enforcements: - path: <path> rule: <rule> Where `<path>` is a YAML-ish path to a config field and `<rule>` is any expression our config validator understands (expressions built in by the validator library and custom tags defined in `config.validation.go`). Example policy: enforcements: - path: variants.production.base rule: oneof=debian:jessie debian:stretch - path: variants.production.runs.as rule: ne=foo - path: variants.production.node.dependencies rule: isfalse Command flag parsing was implemented in `main.go` to support the new `--policy=uri` flag and improve existing handling of `--version` and the usage statement. Test Plan: Run `go test ./...`. Reviewers: thcipriani, demon, hashar, mmodell, #release-engineering-team Reviewed By: thcipriani, #release-engineering-team Tags: #release-engineering-team Differential Revision: https://phabricator.wikimedia.org/D999
2017-11-16Use dep for dependency management and commit vendorDan Duvall1-0/+57
Summary: Our current lack of dependency management is leading to issues with Debian packaging and risks inconsistent builds. Let's use `dep`, the "official experiment" for go dependency management, and commit the vendor directory which is small enough following a `dep prune`. Fixes T180530 Depends on D881 Test Plan: Run `make` or `go build -v` and examine output to ensure use of `vendor/` packages. Reviewers: thcipriani, Joe, #release-engineering-team Reviewed By: thcipriani, #release-engineering-team Tags: #release-engineering-team Maniphest Tasks: T180530 Differential Revision: https://phabricator.wikimedia.org/D882