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.

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