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.

88 lines
2.6 KiB

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