add drone
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2023-04-03 14:30:42 +10:00
parent f61441fe99
commit dc0d77ad11
3 changed files with 37 additions and 0 deletions

9
.drone.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
export now=$(TZ=Australia/Sydney date '+%Y%m%d-%H%M%S')
echo $now
echo "build commences"
go build -ldflags "-X main.sha1ver=`git rev-parse HEAD` -X main.buildTime=$now" -o ccsecrets
echo "build complete"
sha256sum ccsecrets > ccsecrets_checksum.txt
ls -lah

27
.drone.yml Normal file
View File

@@ -0,0 +1,27 @@
kind: pipeline
type: docker
name: default
# Docs at https://docs.drone.io/pipeline/exec/overview/
# Also see https://github.com/harness/drone-cli/blob/master/.drone.yml
steps:
- name: build
image: golang
commands:
- sh ./.drone.sh
- name: dell-deploy
# # https://github.com/cschlosser/drone-ftps/blob/master/README.md
image: cschlosser/drone-ftps
environment:
FTP_USERNAME:
from_secret: FTP_USERNAME
FTP_PASSWORD:
from_secret: FTP_PASSWORD
PLUGIN_HOSTNAME: ftp.emc.com:21
PLUGIN_SECURE: false
PLUGIN_VERIFY: false
PLUGIN_CHMOD: false
#PLUGIN_DEBUG: false
PLUGIN_INCLUDE: ^ccsecrets.*$

View File

@@ -45,6 +45,7 @@ func main() {
defer stop() defer stop()
// Creates a router without any middleware by default // Creates a router without any middleware by default
gin.SetMode(gin.ReleaseMode)
router := gin.New() router := gin.New()
// Global middleware // Global middleware