Giter Club home page Giter Club logo

mainrepo's Introduction

CI Tool

Quick Start

Just click here

How to deploy

At the root path of repo, input locally

drone exec [command options] [path/to/.drone.yml]

to build the drone project with the procedure defined in .drone.yml.

kind: pipeline
name: default
steps:
- name: test
  image: gcc
  commands:
  - make
  - make test

Each step starts a new container that includes a clone of your repository, and then runs the contents of your commands section inside it.

Configuration

Input these statements

export DRONE_SERVER=http://202.120.40.8:30331
export DRONE_TOKEN=dtar788Anxv5D1n7VRmvjKhSB******

into the shell which configure the drone.
You can also input

drone info

to check the configuration has been set, or

drone repo ls github

to check the repo.

Sample

Here I attempt a demo in Java image using simplified form as an example

drone exec --pipeline default ./drone.yml

Dependency

  • Docker
  • Drone
  • Github

Procedures for building

Docker

First, install docker. Since it is universally acknowledged, we just skip this step. And if you have not get docker installed, please refer to blogs.

Github OAuth Application

In your account settings, find Developer settings. Click that and create your OAuth Application. Then it will generate a pair of client id and client secret. Keep these information and to the next step.

Docker Compose

Create a new yml file like docker-compose.yml at proper place:

version: '3'
services:
   drone:
      image: "drone/drone:1"
      volumes:
       -  /var/run/docker.sock:/var/run/docker.sock
       -  /var/lib/drone:/data
      environment:
       - DRONE_GITHUB_SERVER=https://github.com
       - DRONE_GITHUB_CLIENT_ID=dda0bad6240**
       - DRONE_GITHUB_CLIENT_SECRET=ca13c24**
       - DRONE_RUNNER_CAPACITY=2
       - DRONE_SERVER_HOST=202.120.40.8:30331
       - DRONE_SERVER_PROTO=http
      ports:
       - 30331:80
       - 443:443
      restart: always

replace DRONE_GITHUB_CLIENT_ID and DRONE_GITHUB_CLIENT_SECRET with your own client id and client secret generated. Besides, replace DRONE_SERVER_HOST with your server host. At where docker-compose.yml exists, run docker-compose up -d. Done!

mainrepo's People

Contributors

2quarius avatar sjtuzwj avatar

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.