This commit is contained in:
parent
e1ac0a3a5b
commit
f6233136d7
236
.drone.yml
236
.drone.yml
@ -3,128 +3,132 @@ type: docker
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
node:
|
node:
|
||||||
lan: internal
|
lan: internal
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- npm install
|
- npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
|
|
||||||
- name: version
|
- name: version
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- export version=`node -p "require('./package.json').version"`
|
- export version=`node -p "require('./package.json').version"`
|
||||||
- export commit=`echo $DRONE_COMMIT | cut -c1-5`
|
- export commit=`echo $DRONE_COMMIT | cut -c1-5`
|
||||||
- npm version prerelease --preid=$commit --git-tag-version=false --allow-same-version=true
|
- npm version prerelease --preid=$commit --git-tag-version=false --allow-same-version=true
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- tag
|
- tag
|
||||||
- pull_request
|
- pull_request
|
||||||
branch:
|
branch:
|
||||||
include:
|
include:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
- name: publish pre
|
- name: publish pre
|
||||||
image: plugins/npm:1.0.0
|
image: plugins/npm:1.0.0
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: npm_username
|
from_secret: npm_username
|
||||||
password:
|
password:
|
||||||
from_secret: npm_password
|
from_secret: npm_password
|
||||||
email: b.watson@watsonlabs.net
|
token:
|
||||||
registry: "http://10.44.1.6:4873/"
|
from_secret: npm_token
|
||||||
when:
|
email: b.watson@watsonlabs.net
|
||||||
event:
|
registry: "https://gitea.watsonlabs.net"
|
||||||
exclude:
|
when:
|
||||||
- tag
|
event:
|
||||||
- pull_request
|
exclude:
|
||||||
branch:
|
- tag
|
||||||
include:
|
- pull_request
|
||||||
- master
|
branch:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
|
||||||
- name: publish tagged version
|
- name: publish tagged version
|
||||||
image: plugins/npm:1.0.0
|
image: plugins/npm:1.0.0
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: npm_username
|
from_secret: npm_username
|
||||||
password:
|
password:
|
||||||
from_secret: npm_password
|
from_secret: npm_password
|
||||||
email: b.watson@watsonlabs.net
|
token:
|
||||||
registry: "http://10.44.1.6:4873/"
|
from_secret: npm_token
|
||||||
when:
|
email: b.watson@watsonlabs.net
|
||||||
event:
|
registry: "http://10.44.1.6:4873/"
|
||||||
- tag
|
when:
|
||||||
exclude:
|
event:
|
||||||
- pull_request
|
- tag
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
- name: remove old package
|
- name: remove old package
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
environment:
|
environment:
|
||||||
SSH_USER:
|
SSH_USER:
|
||||||
from_secret: ssh_user
|
from_secret: ssh_user
|
||||||
settings:
|
settings:
|
||||||
host: homebridge.me
|
host: homebridge.me
|
||||||
envs:
|
envs:
|
||||||
- SSH_USER
|
- SSH_USER
|
||||||
username:
|
username:
|
||||||
from_secret: ssh_user
|
from_secret: ssh_user
|
||||||
key:
|
key:
|
||||||
from_secret: ssh_key
|
from_secret: ssh_key
|
||||||
port: 22
|
port: 22
|
||||||
script:
|
script:
|
||||||
- rm -r /home/$SSH_USER/.npm-global/lib/node_modules/@watsonb8/homebridge-flux
|
- rm -r /home/$SSH_USER/.npm-global/lib/node_modules/@watsonb8/homebridge-flux
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host: homebridge.me
|
host: homebridge.me
|
||||||
username:
|
username:
|
||||||
from_secret: ssh_user
|
from_secret: ssh_user
|
||||||
key:
|
key:
|
||||||
from_secret: ssh_key
|
from_secret: ssh_key
|
||||||
port: 22
|
port: 22
|
||||||
script:
|
script:
|
||||||
- npm install -g @watsonb8/homebridge-flux --registry http://10.44.1.6:4873
|
- npm install -g @watsonb8/homebridge-flux --registry http://10.44.1.6:4873
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: restart homebridge
|
- name: restart homebridge
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host: homebridge.me
|
host: homebridge.me
|
||||||
username:
|
username:
|
||||||
from_secret: elevated_ssh_user
|
from_secret: elevated_ssh_user
|
||||||
key:
|
key:
|
||||||
from_secret: ssh_key
|
from_secret: ssh_key
|
||||||
port: 22
|
port: 22
|
||||||
script:
|
script:
|
||||||
- systemctl restart homebridge
|
- systemctl restart homebridge
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: Notify
|
- name: Notify
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
settings:
|
settings:
|
||||||
host: 10.44.1.13
|
host: 10.44.1.13
|
||||||
username: srvGitea
|
username: srvGitea
|
||||||
password:
|
password:
|
||||||
from_secret: smtp_password
|
from_secret: smtp_password
|
||||||
from: drone@watsonlabs.net
|
from: drone@watsonlabs.net
|
||||||
skip_verify: true
|
skip_verify: true
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- failure
|
- failure
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "@watsonb8/homebridge-flux",
|
"name": "@watsonb8/homebridge-flux",
|
||||||
"version": "1.1.3",
|
"version": "1.1.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "bin/index.js",
|
"main": "bin/index.js",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "http://10.44.1.6:4873/"
|
"registry": "https://gitea.watsonlabs.net"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"bin",
|
"bin",
|
||||||
@ -44,4 +44,4 @@
|
|||||||
"homebridge": "^1.5.0",
|
"homebridge": "^1.5.0",
|
||||||
"typescript": "^4.5.4"
|
"typescript": "^4.5.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user