From 695c4d84e8f938af710480fc9a442f3d0e060253 Mon Sep 17 00:00:00 2001 From: mifi Date: Thu, 4 May 2023 23:05:49 -0400 Subject: [PATCH] Add npmrc, update version, pipeline tweaks - re-enable pipeline in full --- .drone.yml | 158 +++++++++++++++++++++++++-------------------------- .npmrc | 3 + package.json | 2 +- 3 files changed, 83 insertions(+), 80 deletions(-) create mode 100644 .npmrc diff --git a/.drone.yml b/.drone.yml index dbe7c5e..3521373 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,96 +1,96 @@ -# kind: pipeline -# type: docker -# name: Test Pipeline +kind: pipeline +type: docker +name: Test Pipeline -# workspace: -# path: /drone/grow +workspace: + path: /drone/grow -# steps: -# - name: yarn install -# image: node:latest -# commands: -# - yarn install +steps: +- name: yarn install + image: node:latest + commands: + - yarn install -# - name: Code Style Checks -# image: node:latest -# commands: -# - yarn prettier +- name: Code Style Checks + image: node:latest + commands: + - yarn prettier -# - name: Lint -# image: node:latest -# commands: -# - yarn lint +- name: Lint + image: node:latest + commands: + - yarn lint -# - name: Unit Tests -# image: node:latest -# commands: -# - yarn test +- 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 +- 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 +trigger: + event: + - push -# --- -# kind: pipeline -# type: docker -# name: Build Pipeline +--- +kind: pipeline +type: docker +name: Build Pipeline -# workspace: -# path: /drone/grow +workspace: + path: /drone/grow -# steps: -# - name: yarn install -# image: node:latest -# commands: -# - yarn install +steps: +- name: yarn install + image: node:latest + commands: + - yarn install -# - name: Build -# image: node:latest -# commands: -# - yarn build +- 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 +- 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 +depends_on: + - Test Pipeline -# trigger: -# branch: -# - main -# event: -# - push +trigger: + branch: + - main + event: + - push -# --- +--- kind: pipeline type: docker name: Publish Pipeline @@ -118,7 +118,6 @@ steps: - from_secret: gitea_token volumes: - name: yarnrc - path: /drone/grow/.yarnrc.yml - name: Report NPM Publish Status image: plugins/webhook settings: @@ -140,6 +139,7 @@ steps: auto_tag: true squash: true repo: git.mifi.dev/mifi/auth + context: mifi registry: git.mifi.dev username: from_secret: registry_username diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..8502fbc --- /dev/null +++ b/.npmrc @@ -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 diff --git a/package.json b/package.json index 8adbbbc..da9c409 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mifi/auth", - "version": "0.0.7", + "version": "0.0.8", "author": "mifi (Mike Fitzpatrick)", "license": "MIT", "scripts": {