Compare commits
2 Commits
aa2611b68d
...
e48037a7d4
| Author | SHA1 | Date | |
|---|---|---|---|
|
e48037a7d4
|
|||
|
ecfa12154d
|
86
.drone.yml
86
.drone.yml
@@ -93,11 +93,77 @@ trigger:
|
|||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: Deploy Pipeline
|
name: Publish Pipeline
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
path: /drone/grow
|
path: /drone/grow
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Build Service
|
||||||
|
image: node:latest
|
||||||
|
commands:
|
||||||
|
- cp /drone/grow/package.json ./
|
||||||
|
- cp /drone/grow/yarn.lock ./
|
||||||
|
- yarn install --frozen-lockfile
|
||||||
|
- cp -r /drone/grow/* .
|
||||||
|
- yarn build
|
||||||
|
|
||||||
|
- name: Publish NPM
|
||||||
|
image: plugins/npm
|
||||||
|
settings:
|
||||||
|
username: mifi
|
||||||
|
registry: git.mifi.dev
|
||||||
|
token:
|
||||||
|
- from_secret: gitea_token
|
||||||
|
|
||||||
|
- name: Build Image
|
||||||
|
image: docker
|
||||||
|
commands:
|
||||||
|
- docker compose build
|
||||||
|
|
||||||
|
- name: Publish Image
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
auto_tag: true
|
||||||
|
repo: git.mifi.dev/mifi/auth
|
||||||
|
registry: git.mifi.dev
|
||||||
|
|
||||||
|
- name: Send Status Notifications
|
||||||
|
image: plugins/webhook
|
||||||
|
settings:
|
||||||
|
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
|
||||||
|
content_type: application/json
|
||||||
|
template: |
|
||||||
|
{
|
||||||
|
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
|
||||||
|
"text": "[{{ repo.name }} - New tagged docker image release {{tag}} from # {{ build.number }}] Deploy {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
|
||||||
|
"username":"DroneBot"
|
||||||
|
}
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- Build Pipeline
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: Publish Pipeline
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
path: /drone/grow
|
||||||
|
|
||||||
|
image_pull_secrets:
|
||||||
|
- from_secret: gitea_token
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build Container
|
- name: Build Container
|
||||||
image: node:latest
|
image: node:latest
|
||||||
@@ -107,6 +173,7 @@ steps:
|
|||||||
- yarn install --frozen-lockfile
|
- yarn install --frozen-lockfile
|
||||||
- cp -r /drone/grow/* .
|
- cp -r /drone/grow/* .
|
||||||
- yarn build
|
- yarn build
|
||||||
|
|
||||||
- name: Deploy Container
|
- name: Deploy Container
|
||||||
image: docker
|
image: docker
|
||||||
commands:
|
commands:
|
||||||
@@ -117,6 +184,7 @@ steps:
|
|||||||
path: ./.env
|
path: ./.env
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
Path: /var/run/docker.sock
|
Path: /var/run/docker.sock
|
||||||
|
|
||||||
- name: Send Status Notifications
|
- name: Send Status Notifications
|
||||||
image: plugins/webhook
|
image: plugins/webhook
|
||||||
settings:
|
settings:
|
||||||
@@ -134,12 +202,6 @@ steps:
|
|||||||
- failure
|
- failure
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: env
|
|
||||||
host:
|
|
||||||
path: /volume1/docker/labs/grow-auth/.env
|
|
||||||
- name: dockersock
|
|
||||||
host:
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- Build Pipeline
|
- Build Pipeline
|
||||||
@@ -148,4 +210,12 @@ trigger:
|
|||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
event:
|
event:
|
||||||
- push
|
- tag
|
||||||
|
|
||||||
|
|
||||||
|
- name: env
|
||||||
|
host:
|
||||||
|
path: /volume1/docker/labs/grow-auth/.env
|
||||||
|
- name: dockersock
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mifi/auth",
|
"name": "@mifi/auth",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"author": "mifi (Mike Fitzpatrick)",
|
"author": "mifi (Mike Fitzpatrick)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user