diff --git a/.drone.yml b/.drone.yml index 146b974..4f54bff 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,8 +1,65 @@ --- kind: pipeline -type: exec +type: docker name: default +steps: + - name: binary build + image: golang + environment: + CGO_ENABLED: 0 + commands: + - go vet + - go build + + - name: static build + image: alpine + commands: + - tar cvzf staticroot.tar.gz -C StaticRoot . + + - name: upload bin + image: plugins/s3 + settings: + bucket: artifacts + access_key: + from_secret: MINIO_ACCESS_KEY + secret_key: + from_secret: MINIO_SECRET_KEY + endpoint: https://minio.burble.dn42 + region: uk-lon3 + path_style: true + source: dn42regsrv + target: /dn42regsrv/${DRONE_BRANCH} + + - name: upload site + image: plugins/s3 + settings: + bucket: artifacts + access_key: + from_secret: MINIO_ACCESS_KEY + secret_key: + from_secret: MINIO_SECRET_KEY + endpoint: https://minio.burble.dn42 + region: uk-lon3 + path_style: true + source: staticroot.tar.gz + target: /dn42regsrv/${DRONE_BRANCH} + +--- +kind: secret +name: MINIO_ACCESS_KEY +get: + path: burble.dn42/kv/data/drone/minio + name: ACCESS_KEY + +--- +kind: secret +name: MINIO_SECRET_KEY +get: + path: burble.dn42/kv/data/drone/minio + name: SECRET_KEY + + steps: - name: build environment: diff --git a/StaticRoot/explorer.js b/StaticRoot/explorer.js index a336e86..53ae631 100644 --- a/StaticRoot/explorer.js +++ b/StaticRoot/explorer.js @@ -57,7 +57,13 @@ Vue.component('reg-attribute', { return reg[2] }, decorated: function() { + // get content, replacing HTML special chars var c = this.content + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'") // an attribute terminated with \n indicates a blank // trailing line, however a single trailing
will