Host snippets with a git backend. Like Gists but OpenSource. https://gist.sigpipe.me/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.drone.yml 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. workspace:
  2. base: /srv/app
  3. path: src/dev.sigpipe.me/dashie/git.txt
  4. clone:
  5. git:
  6. image: plugins/git:1
  7. depth: 50
  8. tags: true
  9. pipeline:
  10. test:
  11. image: webhippie/golang:edge
  12. pull: true
  13. environment:
  14. TAGS: sqlite
  15. GOPATH: /srv/app
  16. commands:
  17. - echo 'http://dl-cdn.alpinelinux.org/alpine/v3.7/main' >> /etc/apk/repositories
  18. - apk update
  19. - apk -U add libmagic file-dev libgit2=0.25.1-r4 libgit2-dev=0.25.1-r4
  20. - make test
  21. when:
  22. event: [ push, tag, pull_request ]
  23. build:
  24. image: webhippie/golang:edge
  25. pull: true
  26. environment:
  27. TAGS: sqlite
  28. GOPATH: /srv/app
  29. commands:
  30. - echo 'http://dl-cdn.alpinelinux.org/alpine/v3.7/main' >> /etc/apk/repositories
  31. - apk update
  32. - apk -U add libmagic file-dev libgit2=0.25.1-r4 libgit2-dev=0.25.1-r4
  33. - make clean
  34. - make vet
  35. - make lint
  36. - make misspell-check
  37. - make build
  38. when:
  39. event: [ push, tag, pull_request ]
  40. static_Linux_x86_64:
  41. image: webhippie/golang:edge
  42. pull: true
  43. environment:
  44. TAGS: sqlite
  45. GOPATH: /srv/app
  46. commands:
  47. - echo 'http://dl-cdn.alpinelinux.org/alpine/v3.7/main' >> /etc/apk/repositories
  48. - apk update
  49. - apk -U add libmagic file-dev libgit2=0.25.1-r4 libgit2-dev=0.25.1-r4
  50. - make clean
  51. - make build
  52. - make release-lx64
  53. when:
  54. event: [ push, tag ]
  55. release:
  56. image: plugins/s3
  57. pull: true
  58. secrets: [ aws_access_key_id, aws_secret_access_key ]
  59. bucket: drone-git.txt
  60. region: us-east-1
  61. endpoint: https://s3.sigpipe.me
  62. path_style: true
  63. strip_prefix: dist/release/
  64. source: dist/release/*.tgz
  65. target: /git.txt/${DRONE_TAG##v}
  66. when:
  67. event: [ tag ]
  68. release:
  69. image: plugins/s3
  70. pull: true
  71. secrets: [ aws_access_key_id, aws_secret_access_key ]
  72. bucket: drone-git.txt
  73. region: us-east-1
  74. endpoint: https://s3.sigpipe.me
  75. path_style: true
  76. strip_prefix: dist/release/
  77. source: dist/release/*.tgz
  78. target: /git.txt/master
  79. when:
  80. event: [ push ]
  81. branch: [ master ]
  82. # static:
  83. # image: karalabe/xgo-latest:latest
  84. # pull: true
  85. # environment:
  86. # TAGS: sqlite
  87. # GOPATH: /srv/app
  88. # commands:
  89. # - make clean
  90. # - make release
  91. # when:
  92. # event: [ push, tag ]
  93. #
  94. # release:
  95. # image: plugins/s3:1
  96. # pull: true
  97. # secrets: [ s3_ak, s3_sk ]
  98. # bucket: drone-git.txt
  99. # endpoint: https://s3.sigpipe.me
  100. # path_style: true
  101. # strip_prefix: dist/release/
  102. # source: dist/release/*
  103. # target: /git.txt/${DRONE_TAG##v}
  104. # when:
  105. # event: [ tag ]
  106. #
  107. # release:
  108. # image: plugins/s3:1
  109. # pull: true
  110. # secrets: [ s3_ak, s3_sk ]
  111. # bucket: releases
  112. # endpoint: https://s3.sigpipe.me
  113. # path_style: true
  114. # strip_prefix: dist/release/
  115. # source: dist/release/*
  116. # target: /git.txt/master
  117. # when:
  118. # event: [ push ]
  119. # branch: [ master ]
  120. notify:
  121. image: plugins/slack
  122. channel: gitea
  123. secrets:
  124. - SLACK_WEBHOOK
  125. when:
  126. event: [ push, tag, pull_request ]
  127. status: [ changed, failure, success ]