Baphomet is the dedicated bot for nulloctet matrix
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.

87 lines
2.6 KiB

  1. ---
  2. resources:
  3. - name: baphomet-js-git
  4. type: git
  5. icon: git
  6. source:
  7. uri: ssh://git@git.nulloctet.com:8437/warricksothr/baphomet-js.git
  8. private_key: |
  9. ((pull_key))
  10. jobs:
  11. - name: test
  12. public: true
  13. plan:
  14. - get: baphomet-js-git
  15. trigger: true
  16. - task: run-tests
  17. config:
  18. platform: linux
  19. image_resource:
  20. type: registry-image
  21. source: { repository: node, tag: "13" }
  22. inputs:
  23. - name: baphomet-js-git
  24. run:
  25. path: /bin/sh
  26. args:
  27. - -c
  28. - |
  29. echo "Node Version: $(node --version)"
  30. echo "NPM Version: $(npm --version)"
  31. cd baphomet-js-git
  32. npm install
  33. npm test
  34. - name: package
  35. public: true
  36. plan:
  37. - get: baphomet-js-git
  38. passed: [test]
  39. trigger: true
  40. - task: capture-version
  41. config:
  42. platform: linux
  43. image_resource:
  44. type: registry-image
  45. source: { repository: bitnami/git, tag: "2-debian-9" }
  46. inputs:
  47. - name: baphomet-js-git
  48. outputs:
  49. - name: baphomet-js-version
  50. run:
  51. path: /bin/sh
  52. args:
  53. - -c
  54. - |
  55. cd baphomet-js-git
  56. echo "$(git describe --tags)-$(git rev-parse HEAD)-$(date --rfc-3339=seconds)" > ../baphomet-js-version/build.info
  57. echo "$(git describe --tags)-$(git rev-parse HEAD)" > ../baphomet-js-version/version.info
  58. cat ../baphomet-js-version/build.info
  59. - task: package
  60. config:
  61. platform: linux
  62. image_resource:
  63. type: registry-image
  64. source: { repository: debian, tag: "stretch-slim" }
  65. inputs:
  66. - name: baphomet-js-git
  67. - name: baphomet-js-version
  68. outputs:
  69. - name: package
  70. run:
  71. path: /bin/sh
  72. args:
  73. - -c
  74. - |
  75. mkdir tmp
  76. cd tmp
  77. cp ../baphomet-js-version/version.info .
  78. cp ../baphomet-js-version/build.info .
  79. cp ../baphomet-js-git/package*.json .
  80. cp ../baphomet-js-git/index.js .
  81. cp -r ../baphomet-js-git/assets .
  82. cp -r ../baphomet-js-git/bot .
  83. cp -r ../baphomet-js-git/data .
  84. cp ../baphomet-js-git/README.md .
  85. cp ../baphomet-js-git/LICENSE.md .
  86. tar -zcvf ../package/baphomet-js-$(cat version.info).tgz ./*