The bulk of the input parameters are mapped directly to gcloud
command options.
Documentation follows for the handful of parameters which are particular to drone-gdm
.
The state
can be one of absent
, present
, or latest
.
Plugin "state" | Object Exists? | Action |
---|---|---|
present | no | create |
present | yes | no action |
latest | no | create |
latest | yes | update |
absent | no | no action |
absent | yes | delete |
The specific action
selected by drone-gdm can be provided to your template
as a property, by specifying passAction: true
. This will invoke your
configuration or template with --properties=action:<action from table above>
.
To circumvent data-type limitations imposed by the passing of properties via the
deployment manager --properties
option, external configuration files (see the
examples for more info), are processed first as golang templates with the following top-level interfaces available for variable interpolation:
.drone
- Drone environment variables provided by the CI system during plugin invocation.plugin
- Plugin parameters passed via environment during plugin invocation.context
- Any variables defined in thevars
section of the plugin invocation.config
- Any variables defined in thevars
section of the configuration definition.properties
- Variables defined in theproperties
section of the configuration definition.gdm
- A dictionary containing:name
- entity name for the configuration/template/compositestatus
- the entity status (e.g. DEPRECATED, EXPERIMENTAL, SUPPORTED)project
- the GCP project nameaction
- the gcloud "action" parameter (i.e.create
,update
, ordelete
)