23 Commits

Author SHA1 Message Date
695c4d84e8 Add npmrc, update version, pipeline tweaks - re-enable pipeline in full
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 23:05:49 -04:00
25908dd9d7 Failing on the same old errors...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 22:18:19 -04:00
34a28b8134 No cache
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 22:08:27 -04:00
7e1f9a1f33 So close I can taste it...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 22:00:41 -04:00
f0ba205a58 Closer? that was a new error...
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 21:51:54 -04:00
1a717cd83e Not likely....
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 21:49:37 -04:00
1e932d97c8 Probably not 2023-05-04 21:43:58 -04:00
d879de2a6b Maybe a fix for the volume syntax?
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 21:41:00 -04:00
34e3eb04af Ooops
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
2023-05-04 21:31:16 -04:00
ff5f88588e Auth? 2023-05-04 21:30:25 -04:00
ac5c09b7da Or maybe add the registry to the package.json...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 21:17:59 -04:00
d1b42fe79f Remove registry from package.json
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 21:13:01 -04:00
3d32c77bd1 That command never played nice...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 21:05:57 -04:00
8e077810f5 Maybe these path changes will do the trick fixing the volume issues
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 21:04:29 -04:00
5e0621e37d Copy env into workspace?
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:59:54 -04:00
e6f9f9b523 Fix naming collision
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:53:13 -04:00
1c5fdabca6 Recombine Steps
Some checks failed
continuous-integration/drone/push Build encountered an error
2023-05-04 20:48:13 -04:00
7bbb4bb036 A bit more...
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:39:38 -04:00
159f87d07e HOST!
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:36:07 -04:00
244db86113 Trying with the .env file copied in
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:27:29 -04:00
00d9a4f734 Rollback!
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 20:21:15 -04:00
b7a3c12eff again
Some checks are pending
continuous-integration/drone/push Build is running
2023-05-04 19:57:25 -04:00
8e263d7ace Rollback 2023-05-04 19:54:36 -04:00
4 changed files with 136 additions and 165 deletions

View File

@@ -1,99 +1,99 @@
# 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: Publish Pipeline - NPM Package 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
type: docker
name: Publish Pipeline
group: publish group: publish
workspace: workspace:
@@ -107,15 +107,18 @@ steps:
- yarn build - yarn build
- name: Publish NPM - name: Publish NPM
image: plugins/npm image: plugins/npm
failure: ignore
settings: settings:
username: username:
from_secret: regsitry_username from_secret: registry_username
password: password:
from_secret: regsitry_password from_secret: registry_password
registry: https://git.mifi.dev registry: https://git.mifi.dev
token: token:
- from_secret: gitea_token - from_secret: gitea_token
- name: Send Status Notifications volumes:
- name: yarnrc
- name: Report NPM Publish Status
image: plugins/webhook image: plugins/webhook
settings: settings:
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
@@ -123,57 +126,33 @@ steps:
template: | template: |
{ {
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png", "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}}", "text": "[{{ repo.name }} - New npm package release {{tag}} from # {{ build.number }}] Deploy {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot" "username":"DroneBot"
} }
when: when:
status: status:
- success - success
- failure - failure
# depends_on:
# - Build Pipeline
trigger:
branch:
- main
# event:
# - tag
---
kind: pipeline
type: docker:dind
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:
auto_tag: true auto_tag: true
squash: true squash: true
repo: git.mifi.dev/mifi/auth repo: git.mifi.dev/mifi/auth
context: mifi
registry: git.mifi.dev registry: git.mifi.dev
username: username:
from_secret: regsitry_username from_secret: registry_username
password: password:
from_secret: regsitry_password from_secret: registry_password
ssh-agent-key: ssh-agent-key:
from_secret: gitea_token from_secret: gitea_token
volumes: volumes:
- name: dockersock - name: dockersock
Path: /var/run path: /var/run/docker.sock
- name: dockerconfig - name: dockerconfig
Path: /.docker/config.json path: /drone/grow/.docker/config.json
- name: Send Status Notifications - name: Report Image Publish Status
image: plugins/webhook image: plugins/webhook
settings: settings:
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
@@ -181,7 +160,7 @@ steps:
template: | template: |
{ {
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png", "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}}", "text": "[{{ repo.name }} - New docker image release {{tag}} from # {{ build.number }}] Deploy {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot" "username":"DroneBot"
} }
when: when:
@@ -189,21 +168,16 @@ steps:
- success - success
- failure - failure
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes: volumes:
- name: dockersock
temp: {}
# - name: dockersock
# path: /var/run/docker.sock
- name: dockerconfig - name: dockerconfig
path: /volume1/docker/labs/grow-auth/dockerconfig.json host:
path: /volume1/docker/dockerconfig.json
- name: dockersock
host:
path: /var/run/docker.sock
- name: yarnrc
host:
path: /volume1/docker/.yarnrc.yml
# depends_on: # depends_on:
# - Build Pipeline # - Build Pipeline
@@ -227,20 +201,21 @@ workspace:
steps: steps:
- name: Deploy Container - name: Deploy Container
image: docker:dind image: docker
privileged: true privileged: true
commands: commands:
- docker compose build - docker compose build --no-cache
- docker compose up --wait - docker compose up --wait
volumes: volumes:
- name: env - name: env
path: /.env path: /drone/grow/.env
- name: dockersock - name: dockersock
Path: /var/run path: /var/run/docker.sock
- name: dockerconfig - name: dockerconfig
Path: /.docker/config.json path: /drone/grow/.docker/config.json
- name: Send Status Notifications - name: Send Status Notifications
image: plugins/webhook image: plugins/webhook
privileged: true
settings: settings:
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
content_type: application/json content_type: application/json
@@ -255,21 +230,16 @@ steps:
- success - success
- failure - failure
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes: volumes:
- name: env
path: /volume1/docker/labs/grow-auth/.env
- name: dockersock
temp: {}
- name: dockerconfig - name: dockerconfig
path: /volume1/docker/labs/grow-auth/dockerconfig.json host:
path: /volume1/docker/dockerconfig.json
- name: dockersock
host:
path: /var/run/docker.sock
- name: env
host:
path: /volume1/docker/labs/grow-auth/.env
# depends_on: # depends_on:
# - Build Pipeline # - Build Pipeline

3
.npmrc Normal file
View File

@@ -0,0 +1,3 @@
@mifi:registry=https://git.mifi.dev/api/packages/mifi/npm
//git.mifi.dev/api/packages/mifi/npm/:_authToken=${REGISTRY_TOKEN}
@mifi/grow:registry=https://git.mifi.dev

View File

@@ -44,9 +44,6 @@ services:
- 'traefik.http.services.gitea.loadbalancer.server.port=${PORT}' - 'traefik.http.services.gitea.loadbalancer.server.port=${PORT}'
networks: networks:
- docknet - docknet
volumes:
- '/Volume1/docker/.yarnrc.yml:/.yarnrc.yml'
- '/Volume1/docker/labs/grow-auth/.env:/.env'
restart: unless-stopped restart: unless-stopped
image: node image: node
depends_on: depends_on:

View File

@@ -1,6 +1,6 @@
{ {
"name": "@mifi/auth", "name": "@mifi/auth",
"version": "0.0.7", "version": "0.0.8",
"author": "mifi (Mike Fitzpatrick)", "author": "mifi (Mike Fitzpatrick)",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
@@ -80,5 +80,6 @@
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://git.mifi.dev/mifi/auth.git" "url": "https://git.mifi.dev/mifi/auth.git"
} },
"registry": "https://git.mifi.dev"
} }