.gitlab-ci.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. - sleep 10
  47. - docker exec cont cli/build/test/logintest_pos.sh
  48. - docker exec cont cli/build/test/logintest_neg.sh
  49. cli-cryptotest:
  50. stage: test
  51. before_script:
  52. - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  53. after_script:
  54. - docker stop cont
  55. - docker rm cont
  56. script:
  57. - docker pull "$CI_REGISTRY_IMAGE:testing"
  58. - docker run -d --name cont "$CI_REGISTRY_IMAGE:testing"
  59. - sleep 10
  60. - docker exec cont cli/build/test/cryptoput.sh /root/build/files
  61. - docker exec cont cli/build/test/cryptoget.sh /root/build/files