.gitlab-ci.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. build_branch:
  2. image: docker.infra.flowdat.com/fd3/sf-php:latest
  3. script:
  4. - chmod 0600 keys/*
  5. - eval $(ssh-agent); ssh-add keys/gogs.drone.id_rsa
  6. - git fetch --tags
  7. - git remote add gogs ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/kea.git
  8. - git checkout $CI_COMMIT_REF_NAME
  9. - git push -u gogs $CI_COMMIT_REF_NAME --tags
  10. only:
  11. - pushes
  12. - branches
  13. image: docker:stable
  14. services:
  15. - docker:dind
  16. variables:
  17. DOCKER_URL: docker.infra.flowdat.com/fd3
  18. DOCKER_USER: drone
  19. DOCKER_PWD: 6hd2dLfL
  20. DOCKER_HOST: tcp://docker:2375
  21. DOCKER_DRIVER: overlay2
  22. docker_kea_oss:
  23. stage: build
  24. script:
  25. - docker info
  26. - docker login -u $DOCKER_USER -p $DOCKER_PWD docker.infra.flowdat.com
  27. - docker pull $DOCKER_URL/kea-oss-1.4.0:latest || true
  28. - cd 1.4.0/kea-oss
  29. - docker build --cache-from $DOCKER_URL/kea-oss-1.4.0:latest --tag $DOCKER_URL/kea-oss-1.4.0:"${CI_COMMIT_TAG##v}" --tag $DOCKER_URL/kea-oss-1.4.0:latest .
  30. - docker push $DOCKER_URL/kea-oss-1.4.0:latest
  31. - docker push $DOCKER_URL/kea-oss-1.4.0:"${CI_COMMIT_TAG##v}"
  32. only:
  33. refs:
  34. - tags
  35. variables:
  36. - $CI_COMMIT_TAG =~ /^v[0-9]+(.[0-9]+)*/
  37. docker_kea_ik:
  38. stage: build
  39. script:
  40. - docker info
  41. - docker login -u $DOCKER_USER -p $DOCKER_PWD docker.infra.flowdat.com
  42. - docker pull $DOCKER_URL/kea-oss-1.4.0:latest || true
  43. - docker pull $DOCKER_URL/kea_ik:latest || true
  44. - cd 1.4.0/kea-ik
  45. - docker build --cache-from $DOCKER_URL/kea_ik:latest --tag $DOCKER_URL/kea_ik:"${CI_COMMIT_TAG##v}" --tag $DOCKER_URL/kea_ik:latest .
  46. - docker push $DOCKER_URL/kea_ik:latest
  47. - docker push $DOCKER_URL/kea_ik:"${CI_COMMIT_TAG##v}"
  48. only:
  49. refs:
  50. - tags
  51. variables:
  52. - $CI_COMMIT_TAG =~ /^v[0-9]+(.[0-9]+)*/