Compare commits
14 Commits
0.0.5
...
f3ff19098b
| Author | SHA1 | Date | |
|---|---|---|---|
|
f3ff19098b
|
|||
|
8bc852fa7d
|
|||
|
8e06b98695
|
|||
|
809255baa6
|
|||
|
21e80ca883
|
|||
|
cfb7c7e453
|
|||
|
82498e7714
|
|||
|
87a611459a
|
|||
|
0a09208766
|
|||
|
99ce364dc4
|
|||
|
2daa33f3ac
|
|||
|
2814c6820b
|
|||
|
d9cafe009d
|
|||
|
d011f15136
|
270
.drone.yml
270
.drone.yml
@@ -1,99 +1,100 @@
|
|||||||
|
# kind: pipeline
|
||||||
|
# type: docker
|
||||||
|
# name: Test Pipeline
|
||||||
|
|
||||||
|
# workspace:
|
||||||
|
# path: /drone/grow
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# - name: yarn install
|
||||||
|
# image: node:latest
|
||||||
|
# commands:
|
||||||
|
# - yarn install
|
||||||
|
|
||||||
|
# - name: Code Style Checks
|
||||||
|
# image: node:latest
|
||||||
|
# commands:
|
||||||
|
# - yarn prettier
|
||||||
|
|
||||||
|
# - name: Lint
|
||||||
|
# image: node:latest
|
||||||
|
# commands:
|
||||||
|
# - yarn lint
|
||||||
|
|
||||||
|
# - name: Unit Tests
|
||||||
|
# image: node:latest
|
||||||
|
# commands:
|
||||||
|
# - yarn test
|
||||||
|
|
||||||
|
# - name: Send Status Notification
|
||||||
|
# image: plugins/webhook
|
||||||
|
# settings:
|
||||||
|
# urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
|
||||||
|
# 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 }} - Build # {{ build.number }}] Code Quality Checks {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
|
||||||
|
# "username":"DroneBot"
|
||||||
|
# }
|
||||||
|
# when:
|
||||||
|
# status:
|
||||||
|
# - success
|
||||||
|
# - failure
|
||||||
|
|
||||||
|
# trigger:
|
||||||
|
# event:
|
||||||
|
# - push
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# kind: pipeline
|
||||||
|
# type: docker
|
||||||
|
# name: Build Pipeline
|
||||||
|
|
||||||
|
# workspace:
|
||||||
|
# path: /drone/grow
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# - name: yarn install
|
||||||
|
# image: node:latest
|
||||||
|
# commands:
|
||||||
|
# - yarn install
|
||||||
|
|
||||||
|
# - name: Build
|
||||||
|
# image: node:latest
|
||||||
|
# commands:
|
||||||
|
# - yarn build
|
||||||
|
|
||||||
|
# - 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 }} - Build # {{ build.number }}] Build package {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
|
||||||
|
# "username":"DroneBot"
|
||||||
|
# }
|
||||||
|
# when:
|
||||||
|
# status:
|
||||||
|
# - success
|
||||||
|
# - failure
|
||||||
|
|
||||||
|
# depends_on:
|
||||||
|
# - Test Pipeline
|
||||||
|
|
||||||
|
# trigger:
|
||||||
|
# branch:
|
||||||
|
# - main
|
||||||
|
# event:
|
||||||
|
# - push
|
||||||
|
|
||||||
|
# ---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: Test Pipeline
|
name: Publish Pipeline - NPM Package
|
||||||
|
group: publish
|
||||||
workspace:
|
|
||||||
path: /drone/grow
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: yarn install
|
|
||||||
image: node:latest
|
|
||||||
commands:
|
|
||||||
- yarn install
|
|
||||||
|
|
||||||
- name: Code Style Checks
|
|
||||||
image: node:latest
|
|
||||||
commands:
|
|
||||||
- yarn prettier
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
image: node:latest
|
|
||||||
commands:
|
|
||||||
- yarn lint
|
|
||||||
|
|
||||||
- name: Unit Tests
|
|
||||||
image: node:latest
|
|
||||||
commands:
|
|
||||||
- yarn test
|
|
||||||
|
|
||||||
- name: Send Status Notification
|
|
||||||
image: plugins/webhook
|
|
||||||
settings:
|
|
||||||
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
|
|
||||||
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 }} - Build # {{ build.number }}] Code Quality Checks {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
|
|
||||||
"username":"DroneBot"
|
|
||||||
}
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- success
|
|
||||||
- failure
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: Build Pipeline
|
|
||||||
|
|
||||||
workspace:
|
|
||||||
path: /drone/grow
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: yarn install
|
|
||||||
image: node:latest
|
|
||||||
commands:
|
|
||||||
- yarn install
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
image: node:latest
|
|
||||||
commands:
|
|
||||||
- yarn build
|
|
||||||
|
|
||||||
- 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 }} - Build # {{ build.number }}] Build package {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
|
|
||||||
"username":"DroneBot"
|
|
||||||
}
|
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- success
|
|
||||||
- failure
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- Test Pipeline
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: Publish Pipeline
|
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
path: /drone/grow
|
path: /drone/grow
|
||||||
@@ -102,18 +103,58 @@ steps:
|
|||||||
- name: Build Service
|
- name: Build Service
|
||||||
image: node:latest
|
image: node:latest
|
||||||
commands:
|
commands:
|
||||||
- cp /drone/grow/package.json ./
|
- yarn install
|
||||||
- cp /drone/grow/yarn.lock ./
|
|
||||||
- yarn install --frozen-lockfile
|
|
||||||
- cp -r /drone/grow/* .
|
|
||||||
- yarn build
|
- yarn build
|
||||||
- name: Publish NPM
|
- name: Publish NPM
|
||||||
image: plugins/npm
|
image: plugins/npm
|
||||||
settings:
|
settings:
|
||||||
username: mifi
|
username:
|
||||||
|
from_secret: regsitry_username
|
||||||
|
password:
|
||||||
|
from_secret: regsitry_password
|
||||||
registry: git.mifi.dev
|
registry: git.mifi.dev
|
||||||
token:
|
token:
|
||||||
- from_secret: gitea_token
|
- from_secret: gitea_token
|
||||||
|
- 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 - Docker Image
|
||||||
|
group: publish
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
path: /drone/grow
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Build Service
|
||||||
|
image: node:latest
|
||||||
|
commands:
|
||||||
|
- yarn install
|
||||||
|
- yarn build
|
||||||
- name: Publish Image
|
- name: Publish Image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
@@ -121,6 +162,10 @@ steps:
|
|||||||
squash: true
|
squash: true
|
||||||
repo: git.mifi.dev/mifi/auth
|
repo: git.mifi.dev/mifi/auth
|
||||||
registry: git.mifi.dev
|
registry: git.mifi.dev
|
||||||
|
username:
|
||||||
|
from_secret: regsitry_username
|
||||||
|
password:
|
||||||
|
from_secret: regsitry_password
|
||||||
ssh-agent-key:
|
ssh-agent-key:
|
||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
volumes:
|
volumes:
|
||||||
@@ -150,14 +195,14 @@ volumes:
|
|||||||
- name: dockerconfig
|
- name: dockerconfig
|
||||||
path: /volume1/docker/labs/grow-auth/dockerconfig.json
|
path: /volume1/docker/labs/grow-auth/dockerconfig.json
|
||||||
|
|
||||||
depends_on:
|
# depends_on:
|
||||||
- Build Pipeline
|
# - Build Pipeline
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
event:
|
# event:
|
||||||
- tag
|
# - tag
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@@ -172,17 +217,18 @@ workspace:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy Container
|
- name: Deploy Container
|
||||||
image: docker
|
image: docker:dind
|
||||||
|
privileged: true
|
||||||
commands:
|
commands:
|
||||||
- compose build .
|
- docker compose build
|
||||||
- compose up --wait
|
- docker compose up --wait
|
||||||
volumes:
|
volumes:
|
||||||
- name: env
|
- name: env
|
||||||
path: /.env
|
path: ./.env
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
Path: /var/run/docker.sock
|
Path: /var/run/docker.sock
|
||||||
- name: dockerconfig
|
- name: dockerconfig
|
||||||
Path: /.docker/config.json
|
Path: ./.docker/config.json
|
||||||
- name: Send Status Notifications
|
- name: Send Status Notifications
|
||||||
image: plugins/webhook
|
image: plugins/webhook
|
||||||
settings:
|
settings:
|
||||||
@@ -207,11 +253,11 @@ volumes:
|
|||||||
- name: dockerconfig
|
- name: dockerconfig
|
||||||
path: /volume1/docker/labs/grow-auth/dockerconfig.json
|
path: /volume1/docker/labs/grow-auth/dockerconfig.json
|
||||||
|
|
||||||
depends_on:
|
# depends_on:
|
||||||
- Build Pipeline
|
# - Build Pipeline
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
event:
|
# event:
|
||||||
- tag
|
# - tag
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mifi/auth",
|
"name": "@mifi/auth",
|
||||||
"version": "0.0.4",
|
"version": "0.0.7",
|
||||||
"author": "mifi (Mike Fitzpatrick)",
|
"author": "mifi (Mike Fitzpatrick)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user