.gitlab-ci.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. image: docker:19.03.1
  2. services:
  3. - docker:dind
  4. stages:
  5. - build
  6. - test
  7. build-image:
  8. stage: build
  9. before_script:
  10. - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  11. script:
  12. - docker build --pull -t "$CI_REGISTRY_IMAGE:testing" -f Dockerfile.testing .
  13. - docker push "$CI_REGISTRY_IMAGE:testing"
  14. daemon-jsonCommaderTest:
  15. stage: test
  16. before_script:
  17. - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  18. after_script:
  19. - docker stop cont
  20. - docker rm cont
  21. script:
  22. - docker pull "$CI_REGISTRY_IMAGE:testing"
  23. - docker run -d --name cont "$CI_REGISTRY_IMAGE:testing"
  24. - docker exec cont daemon/build/test/jsonCommanderTest
  25. cli-cmdman_test:
  26. stage: test
  27. before_script:
  28. - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  29. after_script:
  30. - docker stop cont
  31. - docker rm cont
  32. script:
  33. - docker pull "$CI_REGISTRY_IMAGE:testing"
  34. - docker run -d --name cont "$CI_REGISTRY_IMAGE:testing"
  35. - docker exec cont cli/build/test/cmdman_test
  36. cli-logintest:
  37. stage: test
  38. before_script:
  39. - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  40. after_script:
  41. - docker stop cont
  42. - docker rm cont
  43. script:
  44. - docker pull "$CI_REGISTRY_IMAGE:testing"
  45. - docker run -d --name cont "$CI_REGISTRY_IMAGE:testing"
  46. - docker exec cont cli/build/test/logintest_pos.sh
  47. - docker exec cont cli/build/test/logintest_neg.sh
  48. cli-cryptotest:
  49. stage: test
  50. before_script:
  51. - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  52. after_script:
  53. - docker stop cont
  54. - docker rm cont
  55. script:
  56. - docker pull "$CI_REGISTRY_IMAGE:testing"
  57. - docker run -d --name cont "$CI_REGISTRY_IMAGE:testing"
  58. - docker exec cont cli/build/test/cryptoput.sh /root/build/files
  59. - docker exec cont cli/build/test/cryptoget.sh /root/build/files