Giter Club home page Giter Club logo

drone-gitea-yml-endpoint's Introduction

Usage example

.drone.yml:

kind: pipeline
name: drone-test

steps:

### ansible ###

- name: ansible-host1
  image: ansible/ansible-runner
  commands:
  - echo "ansible deploy here"
  - ansible --version
  when:
    message_contains:
    - ansible/host1

### docker ###

- name: step-without-custom-condition1
  image: alpine:latest
  commands:
  - echo "step_without_custom_condition1"

- name: build-app1
  image: osshelpteam/drone-docker-tcp
  settings:
    docker_host: 172.17.0.1
    registry: 172.17.0.1:5000
    repo: project/app1
    tags: [ latest, 1, 1.1.2 ]
    context: docker/app1
  when:
    message_contains:
    - docker/all
    - docker/app1

- name: test-app1
  image: alpine:latest
  commands:
  - echo "test-app1 step"
  when:
    message_contains:
    - docker/all
    - docker/app1

- name: deploy-app1
  image: alpine:latest
  commands:
  - echo "deploy-app1 step"
  when:
    message_contains:
    - docker/app1

- name: step-without-custom-condition2
  image: alpine:latest
  commands:
  - echo "step_without_custom_condition2"

- name: build-app2
  image: osshelpteam/drone-docker-tcp
  settings:
    docker_host: 172.17.0.1
    registry: 172.17.0.1:5000
    repo: project/app2
    tags: [ latest, 1, 1.1.2 ]
    context: docker/app2
  when:
    message_contains:
    - docker/all
    - docker/app2

- name: test-app2
  image: alpine:latest
  commands:
  - echo "test-app2 step"
  when:
    message_contains:
    - docker/all
    - docker/app2

- name: deploy-app2
  image: alpine:latest
  commands:
  - echo "deploy-app2 step"
  when:
    message_contains:
    - docker/app2

- name: step-without-custom-condition3
  image: alpine:latest
  commands:
  - echo "step_without_custom_condition3"

- name: deploy-all-apps-if-deploy-params-changed-or-redeploy-is-needed
  image: alpine:latest
  commands:
  - echo "deploy-all-apps-if-deploy-params-changed"
  when:
    message_contains:
    - docker/all
    - docker/stack-or-compose-name

### notifications

#- name: slack
#  image: plugins/slack
#  settings:
#    webhook:
#      from_secret: slack-webhook
#  when:
#    status: [ success, failure ]

Deploy example

version: '3'
services:
  drone:
    container_name: drone
    image: drone/drone:1
    restart: always
    ports:
      - "80:80"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /mnt/data/drone:/data
    depends_on:
      - drone-yml-endpoint
    environment:
      DRONE_GITEA_SERVER: "http://gitea"
      DRONE_GIT_ALWAYS_AUTH: "true"
      DRONE_SERVER_HOST: "drone-ci"
      DRONE_SERVER_PROTO: "http"
      DRONE_TLS_AUTOCERT: "false"
      DRONE_LOGS_DEBUG: "true"
      DRONE_YAML_ENDPOINT: "http://drone-yml-endpoint:8080"
    networks:
      - net

  drone-yml-endpoint:
    container_name: drone-yml-endpoint
    image: osshelpteam/drone-gitea-yml-endpoint:latest
    restart: always
    environment:
      GITEA_HOST: "http://gitea"
      GITEA_TOKEN: "token"
    networks:
      - net

networks:
  net:

drone-gitea-yml-endpoint's People

Stargazers

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