validate

command
v0.0.0-...-e37a79b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 8 Imported by: 0

README

The builds are kicked off by JSON data in the form of an array of archive.Spec structs. These are passed to the build as template parameters. There is no way for ADO to validate the format of an Object template parameter, so it has to be validated before it is used to ensure it won't cause problems later on in the build.

In the future, we should provide more robust validation, possibly using cue.

Usage:
  -project string
    	name of project
  -revision string
    	revision for build set
  -tag string
    	tag for build set

Look at the code for the current validation rules. There is a good chance that this README is out of date, but at the time of its writing the rules were:

  1. All specs must have the same package name
  2. All specs must have the same tag
  3. All specs must have the same revision number
  4. All specs must have the same commit
  5. All specs must have the same repo
  6. The Pkg value for all specs must match the value passed in as the --project argument
  7. The Tag value for all specs must match the value passed in as the --tag argument
  8. The Revision value for all specs must match the value passed in as the --revision argument
  9. No spec may have a blank value
  10. No spec value may contain a single quote ('), as the spec is injected into bash scripts surrounded by single quotes.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL