Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

refs #TECH: migrate from rex to rowdy #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 85 additions & 42 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,90 @@
pipeline:
publish-image:
image: plugins/docker
---
kind: pipeline
type: kubernetes
name: push

platform:
os: linux
arch: amd64

steps:
- name: publish-image-prod
image: plugins/docker
settings:
password:
from_secret: docker_password
repo: prontopro/drone-git
dockerfile: Dockerfile
secrets: [docker_username, docker_password]
tags:
- latest
- ${DRONE_COMMIT_BRANCH}
- ${DRONE_COMMIT_BRANCH}-${DRONE_BUILD_NUMBER}
when:
branch:
- master
event:
- push

notify-image-prod:
image: plugins/slack
tag:
- latest
- ${DRONE_COMMIT_BRANCH}
- ${DRONE_COMMIT_BRANCH}-${DRONE_BUILD_NUMBER}
username:
from_secret: docker_username
depends_on:
- build

- name: notify-image-prod
image: plugins/slack
settings:
channel: tech-artifacts
username: drone
secrets:
- slack_webhook
template: drone-git images for ${DRONE_COMMIT_BRANCH}-${DRONE_BUILD_NUMBER} published.
target: production
when:
branch:
- master
event:
- push
status:
- success

notify-image-prod-failure:
image: plugins/slack
username: drone-v1
webhook:
from_secret: slack_webhook
when:
status:
- success
depends_on:
- publish-image-prod

- name: notify-image-prod-failure
image: plugins/slack
settings:
channel: tech-artifacts-fail
username: drone
secrets:
- slack_webhook
template: drone-git images for ${DRONE_COMMIT_BRANCH}-${DRONE_BUILD_NUMBER} failed to be published.
target: production
when:
branch:
- master
event:
- push
status:
- failure
username: drone-v1
webhook:
from_secret: slack_webhook
when:
status:
- failure
depends_on:
- publish-image-prod

- name: move-asana-cards-to-production
image: plugins/webhook
settings:
content_type: application/json
template: |
{
"owner": "{{ repo.owner }}",
"repo": "{{ repo.name }}",
"section": "production",
"sha": "${DRONE_COMMIT}"
}
urls: https://rowdy.tools.prontopro.tech/v1/drone/tag
environment:
PLUGIN_HEADERS:
from_secret: rowdy_shared_secret
PLUGIN_VALID_RESPONSE_CODES: 204
depends_on:
- publish-image-prod

image_pull_secrets:
- dockerconfig

trigger:
branch:
- master
event:
- push

---
kind: secret
name: rowdy_shared_secret

get:
path: drone-v1-secret-rowdy
name: shared_secret

...
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/.github/ @zuc
/.github/ @ProntoPro/teamleaders
mavimo marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 0 additions & 8 deletions .github/rex.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ branches:
contexts:
- continuous-integration/drone/pr
- continuous-integration/drone/push
- ProntoPro/rex/pr/labels
- ProntoPro/rex/pr/milestone
- rowdy/labels
- rowdy/milestone
enforce_admins: false
restrictions:
users: []
Expand Down