twogg-git / go-droneci

Simple repo to test DroneCI pipelines
0 stars 3 forks source link

DroneCI + Golang + Hub Docker!!!

Build Status

Simple repo to test DroneCI pipelines

Cloud Drone

Add your project into Cloud Drone https://cloud.drone.io

Documentation

https://docs.drone.io/

Plugins

http://plugins.drone.io/

Docker Plugin

http://plugins.drone.io/drone-plugins/drone-docker/

https://hub.docker.com/r/twogghub/go-droneci

- name: publish
  image: plugins/docker
  settings:
    ...
    repo: {your_user}/{your_repo}
    tags:
      - latest

Adding secrets

https://cloud.drone.io/{your_user}/{your_repo}/settings

- name: publish
  ...
    username:
      from_secret: DOCKER_USERNAME
    password:
      from_secret: DOCKER_PASSWORD
    ...

Email Plugin

http://plugins.drone.io/drillster/drone-email/

- name: notify
  image: drillster/drone-email
  settings: 
    host: smtp
    ...
    when:
      status: [ changed, success ]

services:
- name: smtp
  image: catatnight/postfix
  environment:
    ports: 25
    ...

Testing locally

docker run --rm -p 8282:8080 --name testing twogghub/go-droneci:latest
localhost:8282

Katacoda example

https://www.katacoda.com/courses/cicd/build-docker-images-drone

ToDo