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.

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