drone-template

command module
v0.0.0-...-2055319 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

README

drone-template

Inject building environment variables into template files.

Build Status Go Doc Go Report MicroBadger

Drone plugin for injecting building environment variables into template files. For the usage information and a listing of the available options please take a look at the docs.

Build

Build the binary with the following commands:

go build
go test

Docker

Build the docker image with the following commands:

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo
docker build -t hhxiao/drone-template .

Please note incorrectly building the image for the correct x64 linux and with GCO disabled will result in an error when running the Docker image:

docker: Error response from daemon: Container command
'/bin/drone-template' not found or does not exist..

Usage

Execute from the working directory:

Injecting building environment variables into template java files

docker run --rm \
  -e DRONE_REPO_OWNER=hhxiao \
  -e DRONE_REPO_NAME=drone_template \
  -e DRONE_REPO_LINK=https://github.com/hhxiao/drone_template \
  -e DRONE_COMMIT_BRANCH=master \
  -e DRONE_COMMIT_REF= refs/heads/master \
  -e DRONE_COMMIT_AUTHOR=hhxiao \
  -e DRONE_COMMIT_AUTHOR_EMAIL=hhxiao@gmail.com \
  -e DRONE_COMMIT_MESSAGE="bug fixing" \
  -e DRONE_BUILD_NUMBER=1 \
  -e DRONE_BUILD_STATUS=success \
  -e DRONE_BUILD_LINK=http://beta.drone.io/hhxiao/drone-template/1 \
  -e DRONE_TAG=1.0.0 \
  -e TEMPLATES=src/main/java/main.java \
  hhxiao/drone-template

Reference

This plugin references a lot from the official drone-slack plugin

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