⭐ Be sure to review the Code of Conduct ahead of time!
⚠️ Additional documentation for maintainers can be found here.ℹ️ See the Contributing Guide for information regarding proposing or submitting changes.
This project uses go mod for dependency management.
ℹ️ There is a makefile which provides some shortcuts - specifically:
make
- build and testmake bin
- just build the executable, without testingmake test
- just test the executable (it is built, if absent)make clean
- clean any compiler generated output from the repo
To build and package the docker image:
GOOS=linux GOARCH=amd64 make bin \
&& docker build -t drone-gdm:local .
- main.go: Plugin entrypoint
- config.go: Encapsulates top-level plugin/GDM configuration
- context.go:
gcloud
execution context (path, global options, etc) - run.go: Base functionality for executing
gcloud
and capturing output - gdm.go: GDM command line arg formatting and execution (using run.go)
- composite.go: CLI options and validation particular to composite types
- deployment.go: CLI options and validation particular to deployments
- typeprovider.go: CLI options options and validation particular to type providers
- drone.go: Fetch drone-specific parameters from the environment at startup
- parse.go: Drone parameter parser (from environment variables)
- yaml2json.go: Utility functions to ease some difficulties regarding parsing YAML/JSON from strings
Drone-gdm uses Travis CI to automate build, test, and deployment.
The .travis.yml
configuration file is used to set up CI environment. It then
invokes:
- travis/script.sh to build and test the binary
- travis/after-success.sh to build, tag, and push the docker image.