Use drone to build releases
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
6eeeaf9b7a
commit
4f0e2bf4a0
|
@ -0,0 +1,42 @@
|
|||
kind: pipeline
|
||||
name: default
|
||||
type: docker
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: node:latest
|
||||
volumes:
|
||||
- name: build
|
||||
path: /build
|
||||
commands:
|
||||
- echo "v1.2.0" > /build/version.txt
|
||||
- npm install
|
||||
- npm run build
|
||||
- cp -R dist /build/dist
|
||||
- name: package
|
||||
image: tystuyfzand/fpm
|
||||
volumes:
|
||||
- name: build
|
||||
path: /build
|
||||
commands:
|
||||
- export VERSION=`cat /build/version.txt`
|
||||
- packaging/build-package.sh
|
||||
- cd /build/dist && tar zcvf /build/arm-web.tgz .
|
||||
- rm -rf /build/dist
|
||||
- name: release
|
||||
image: tystuyfzand/drone-gitea-release
|
||||
volumes:
|
||||
- name: build
|
||||
path: /build
|
||||
settings:
|
||||
gitea_server: https://git.meow.tf
|
||||
tag_file: /build/version.txt
|
||||
title_file: /build/version.txt
|
||||
files: [ '/build/*' ]
|
||||
environment:
|
||||
PLUGIN_API_KEY:
|
||||
from_secret: gitea_token
|
||||
|
||||
volumes:
|
||||
- name: build
|
||||
temp: {}
|
|
@ -11,3 +11,6 @@ yarn-error.log*
|
|||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.iml
|
||||
|
||||
package-lock.json
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
mkdir -p out || true
|
||||
fpm -s dir -t deb -p out/arm-web_$VERSION.deb \
|
||||
fpm -s dir -t deb -p /build/arm-web_$VERSION.deb \
|
||||
-n arm-web -v $VERSION \
|
||||
--deb-priority optional --force \
|
||||
--deb-compression bzip2 \
|
||||
|
@ -8,4 +7,4 @@ fpm -s dir -t deb -p out/arm-web_$VERSION.deb \
|
|||
--depends nginx \
|
||||
--url "https://meow.tf" \
|
||||
packaging/arm.conf=/etc/nginx/conf.d/arm.conf \
|
||||
dist/=/var/www/arm-web
|
||||
/build/dist=/var/lib/arm/web
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<ul class="navbar-nav ml-auto" v-if="sensors.cpu || sensors.memory || sensors.disks">
|
||||
<ul class="navbar-nav ml-auto" v-if="sensors.cpu || sensors.cpuName || sensors.memory || sensors.disks">
|
||||
<cpu_status :status="sensors.cpu" :cpuName="sensors.cpuName" :temperatures="sensors.temperatures"></cpu_status>
|
||||
<memory_status :status="sensors.memory"></memory_status>
|
||||
<disk_status :status="sensors.disks"></disk_status>
|
||||
|
|
|
@ -27,15 +27,12 @@
|
|||
if (!this.status) {
|
||||
return '0.00';
|
||||
}
|
||||
return parseFloat(this.status.UserPct).toFixed(2);
|
||||
return parseFloat(this.status).toFixed(2);
|
||||
},
|
||||
percentageClass: function() {
|
||||
if (!this.status) {
|
||||
return 'info';
|
||||
}
|
||||
if (this.status.UserPct >= 90) {
|
||||
if (this.status >= 90) {
|
||||
return 'danger';
|
||||
} else if (this.status.UserPct >= 80) {
|
||||
} else if (this.status >= 80) {
|
||||
return 'warning';
|
||||
}
|
||||
return 'success'
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
<b-nav-item-dropdown no-caret right>
|
||||
<template slot="button-content">
|
||||
<font-awesome-icon icon="microchip" /> Memory
|
||||
<b-progress :value="memoryPercentage" height=".5rem" :variant="percentageClass"></b-progress>
|
||||
<b-progress :value="this.status.usedPercent" height=".5rem" :variant="percentageClass"></b-progress>
|
||||
</template>
|
||||
<b-dropdown-header class="text-center">Memory</b-dropdown-header>
|
||||
<div class="text-center">
|
||||
<span :class="'badge badge-' + percentageClass"><formatBytes :bytes="status.MemUsed * 1024" /> / <formatBytes :bytes="status.MemTotal * 1024" /></span>
|
||||
<span :class="'badge badge-' + percentageClass"><formatBytes :bytes="status.used * 1024" /> / <formatBytes :bytes="status.total * 1024" /></span>
|
||||
|
||||
</div>
|
||||
</b-nav-item-dropdown>
|
||||
|
@ -17,14 +17,8 @@
|
|||
name: 'memory_status',
|
||||
props: [ 'status' ],
|
||||
computed: {
|
||||
memoryPercentage: function() {
|
||||
return (this.status.MemUsed / this.status.MemTotal) * 100;
|
||||
},
|
||||
memoryBufCachePercentage: function() {
|
||||
return ((this.status.Buffers + this.status.Cached) / this.status.MemTotal) * 100;
|
||||
},
|
||||
percentageClass: function() {
|
||||
let usedPercent = (this.status.MemUsed / this.status.MemTotal) * 100;
|
||||
let usedPercent = this.status.usedPercent;
|
||||
if (usedPercent >= 90) {
|
||||
return 'danger';
|
||||
} else if (usedPercent >= 80) {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
window.arm_config = {
|
||||
url: 'ws://192.168.2.85:8080/ws'
|
||||
url: 'ws://192.168.1.8:8080/ws'
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue