summaryrefslogtreecommitdiff
path: root/vendor
AgeCommit message (Collapse)AuthorFilesLines
2018-12-10Use JSON as canonical config formatTyler Cipriani131-30894/+828
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 Duvall82-268/+8511
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 Duvall137-0/+46762
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
2017-11-16Move arcanist-go submodule from vendor to .arcvendorDan Duvall1-0/+0
Summary: In preparation for vendored golang dependencies, we need to move `arcanist-go` out of the way. A new `.arcvendor` directory seems like a decent-ish place. Test Plan: Run `arc unit --everything && arc lint --everything`. Reviewers: thcipriani, #release-engineering-team Reviewed By: thcipriani, #release-engineering-team Tags: #release-engineering-team Differential Revision: https://phabricator.wikimedia.org/D881
2017-07-11Configure arcanist, linters, and unit engineDan Duvall1-0/+0
Summary: Import `arcanist-go` into `vendor` to provide a unit engine and `gofmt`/`govet` linters. Lint with `golint`, `gofmt`, and `govet`. Test Plan: Run `arc lint --everything` and revel at the given advice. Run `arc unit --everything` and hopefully nothing will explode. Reviewers: thcipriani, mmodell, hashar, Jrbranaa, #release-engineering-team Reviewed By: mmodell, #release-engineering-team Tags: #release-engineering-team Differential Revision: https://phabricator.wikimedia.org/D704