Code Monkey home page Code Monkey logo

drone-quickstart's Introduction

drone-quickstart

This repository provides configuration and instructions for how to get started with Drone CI from Harness

Prerequisites

  • Comfortable running commands in the terminal
  • A GitHub account
  • A ngrok account
  • A computer that can run amd64 or arm64 Docker containers (this includes the new M1-based Macs)
    • In your terminal, verify you have docker and docker-compose commands available

Tools used

Steps

Create the tunnel

  1. Login to https://ngrok.com
  2. Open https://dashboard.ngrok.com/get-started/setup, follow the steps to install the ngrok binary and connect to your account
  3. Create the tunnel by running ngrok http 8080 in your terminal, do not stop the process until you are finished with this guide
  4. ngrok will create your tunnel and provide you with a URL such as https://abcd-3fg-hij-k1-mn.ngrok.io, make a note of it

Create the GitHub OAuth Application

  1. Follow Drone's Create an OAuth Application documentation
  • For the "Homepage URL", enter the ngrok URL from the previous step
  • For the "Authorization callback URL", enter the same ngrok URL, with /login appended
  • You will be given the "Client ID" and a "Client secret", make a note of each (the secret is only displayed once, if you misplace it, you will need to generate a new client secret)

Start the Drone and Drone Runner processes

  1. Fork this repository and clone the fork to your computer
  2. Edit the file run.sh
  • Set DRONE_GITHUB_CLIENT_ID and DRONE_GITHUB_CLIENT_SECRET using the "Client ID" and "Client secret" from the previous step
  • Set DRONE_GITHUB_ADMIN to your GitHub username
  • Set DRONE_SERVER_HOST to your ngrok URL, without the https:// (if your ngrok URL is https://abcd-3fg-hij-k1-mn.ngrok.io, set DRONE_SERVER_HOST to abcd-3fg-hij-k1-mn.ngrok.io)
  • Save your changes
  1. Open a new terminal session and change to the directory where you checked out this repository
  • Execute run.sh by typing ./run.sh and hitting enter
  • Open your ngrok URL in a browser, you should be greeted with "Welcome to Drone"! ๐ŸŽ‰

Activate your repository

  1. Click "Continue", you will be prompted to authorize your OAuth application in your GitHub account
  • Next you should see the dashboard, if you do not see any repositories, click the "Sync" button
  1. Your forked repository should now appear in the list, click the repository and then click "Activate Repository"

drone-quickstart's People

Contributors

jimsheldon 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.