GithubHelp home page GithubHelp logo

hippolin / drone-gitlab-ci Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appleboy/drone-gitlab-ci

0.0 2.0 0.0 139 KB

Drone plugin for trigger gitlab-ci jobs.

License: MIT License

Makefile 28.53% Go 71.47%

drone-gitlab-ci's Introduction

drone-gitlab-ci

GoDoc Build Status codecov Go Report Card Docker Pulls

Drone plugin for trigger gitlab-ci jobs.

Build or Download a binary

The pre-compiled binaries can be downloaded from release page. Support the following OS type.

  • Windows amd64/386
  • Linux amd64/386
  • Darwin amd64/386

With Go installed

$ go get -u -v github.com/appleboy/drone-gitlab-ci

or build the binary with the following command:

$ make build

Docker

Build the docker image with the following commands:

$ make docker

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-gitlab-ci' not found or does not exist..

Usage

There are three ways to trigger gitlab-ci jobs.

Usage from binary

trigger job.

drone-gitlab-ci \
  --host https://gitlab.com/ \
  --token XXXXXXXX \
  --ref master \
  --id gitlab-ci-project-id

Enable debug mode.

drone-gitlab-ci \
  --host https://gitlab.com/ \
  --token XXXXXXXX \
  --ref master \
  --id gitlab-ci-project-id
+ --debug

Usage from docker

trigger job.

docker run --rm \
  -e GITLAB_HOST=https://gitlab.com/
  -e GITLAB_TOKEN=xxxxx
  -e GITLAB_REF=master
  -e GITLAB_ID=gitlab-ci-project-id
  appleboy/drone-gitlab-ci

Enable debug mode.

docker run --rm \
  -e GITLAB_HOST=https://gitlab.com/ \
  -e GITLAB_TOKEN=xxxxx \
  -e GITLAB_REF=master \
  -e GITLAB_ID=gitlab-ci-project-id \
  -e GITLAB_DEBUG=true \
  appleboy/drone-gitlab-ci

Usage from drone ci

Execute from the working directory:

docker run --rm \
  -e PLUGIN_HOST=https://gitlab.com/ \
  -e PLUGIN_TOKEN=xxxxx \
  -e PLUGIN_REF=master \
  -e PLUGIN_ID=gitlab-ci-project-id \
  -e PLUGIN_DEBUG=true \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  appleboy/drone-gitlab-ci

You can get more information about how to use scp plugin in drone.

Testing

Test the package with the following command:

$ make test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.