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: markdown image: pandoc/core volumes: - name: shared path: /shared commands: #- pandoc --standalone --output=index.html --metadata title="SMT Readme" -t html5 README.md # From https://gitlab.com/vimalkvn/pandoc-mvp-css - pandoc -s README.md --embed-resources -c www/mvp.css --toc --toc-depth=2 --template template.html -o ./www/index.html - cp ./www/index.html /shared/index.html - name: restore-cache-with-filesystem image: meltwater/drone-cache pull: true settings: backend: "filesystem" #debug: true restore: true cache_key: '{{ .Repo.Name }}_{{ arch }}_{{ os }}' archive_format: "tar" filesystem_cache_root: "/go" local_root: / mount: - pkg.mod - pkg.build volumes: - name: cache path: /go - name: build image: golang environment: CGO_ENABLED: 0 GOMODCACHE: '/drone/src/pkg.mod' GOCACHE: '/drone/src/pkg.build' volumes: - name: shared path: /shared commands: - cp /shared/index.html ./www/ - sh ./.drone.sh # Copy binary to test server - name: coadcorp-deploy image: appleboy/drone-scp settings: host: - 10.63.39.130 username: l075239 password: from_secret: ssh_password port: 22 command_timeout: 2m target: /home/l075239/smt/ source: - smt - cbs_checksum.txt - test.env - www/index.html # Start service - name: coadcorp-restart image: appleboy/drone-ssh settings: host: - 10.63.39.130 username: l075239 password: from_secret: ssh_password port: 22 command_timeout: 2m script: - sudo bash -c 'mv /home/l075239/smt/test.env /home/l075239/smt/.env' - sudo bash -c '/etc/init.d/smt restart' - name: dell-deploy # # https://github.com/cschlosser/drone-ftps/blob/master/README.md image: cschlosser/drone-ftps when: event: - tag 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: ^smt$,^smt_checksum.txt$ PLUGIN_EXCLUDE: ^\.git/$,^\controllers/$,^\middlewares/$,^\models/$,^\utils/$,^\pkg.build/$,^\pkg.mod/$,^\www/$ - name: rebuild-cache-with-filesystem image: meltwater/drone-cache pull: true when: event: - tag settings: backend: "filesystem" #debug: true rebuild: true cache_key: '{{ .Repo.Name }}_{{ arch }}_{{ os }}' archive_format: "tar" filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build volumes: - name: cache path: /go volumes: - name: shared temp: {} - name: cache host: path: /var/lib/cache