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.

119 lines
3.4 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. - name: baphomet-js-git-develop
  12. type: git
  13. icon: git
  14. source:
  15. uri: ssh://git@git.nulloctet.com:8437/warricksothr/baphomet-js.git
  16. private_key: |
  17. ((pull_key))
  18. branch: develop
  19. jobs:
  20. - name: test
  21. public: true
  22. plan:
  23. - get: baphomet-js-git
  24. trigger: true
  25. - task: run-tests
  26. config:
  27. platform: linux
  28. image_resource:
  29. type: registry-image
  30. source: { repository: node, tag: "12.14-stretch" }
  31. inputs:
  32. - name: baphomet-js-git
  33. run:
  34. path: /bin/sh
  35. args:
  36. - -c
  37. - |
  38. echo "Node Version: $(node --version)"
  39. echo "NPM Version: $(npm --version)"
  40. cd baphomet-js-git
  41. npm install
  42. npm test
  43. - name: test-develop
  44. public: true
  45. plan:
  46. - get: baphomet-js-git-develop
  47. trigger: true
  48. - task: run-tests
  49. config:
  50. platform: linux
  51. image_resource:
  52. type: registry-image
  53. source: { repository: node, tag: "12.14-stretch" }
  54. inputs:
  55. - name: baphomet-js-git-develop
  56. run:
  57. path: /bin/sh
  58. args:
  59. - -c
  60. - |
  61. echo "Node Version: $(node --version)"
  62. echo "NPM Version: $(npm --version)"
  63. cd baphomet-js-git-develop
  64. npm install
  65. npm test
  66. - name: package
  67. public: true
  68. plan:
  69. - get: baphomet-js-git
  70. passed: [test]
  71. trigger: true
  72. - task: capture-version
  73. config:
  74. platform: linux
  75. image_resource:
  76. type: registry-image
  77. source: { repository: bitnami/git, tag: "2-debian-9" }
  78. inputs:
  79. - name: baphomet-js-git
  80. outputs:
  81. - name: baphomet-js-version
  82. run:
  83. path: /bin/sh
  84. args:
  85. - -c
  86. - |
  87. cd baphomet-js-git
  88. echo $(./scripts/get_build.sh) > ../baphomet-js-version/build.info
  89. echo $(./scripts/get_version.sh) > ../baphomet-js-version/version.info
  90. cat ../baphomet-js-version/build.info
  91. - task: package
  92. config:
  93. platform: linux
  94. image_resource:
  95. type: registry-image
  96. source: { repository: debian, tag: "stretch-slim" }
  97. inputs:
  98. - name: baphomet-js-git
  99. - name: baphomet-js-version
  100. outputs:
  101. - name: package
  102. run:
  103. path: /bin/sh
  104. args:
  105. - -c
  106. - |
  107. mkdir tmp
  108. cd tmp
  109. cp ../baphomet-js-version/version.info .
  110. cp ../baphomet-js-version/build.info .
  111. cp ../baphomet-js-git/package*.json .
  112. cp ../baphomet-js-git/index.js .
  113. cp -r ../baphomet-js-git/assets .
  114. cp -r ../baphomet-js-git/bot .
  115. cp -r ../baphomet-js-git/data .
  116. cp ../baphomet-js-git/README.md .
  117. cp ../baphomet-js-git/LICENSE.md .
  118. tar -zcvf ../package/baphomet-js-$(cat version.info).tgz ./*