Guillermo Espinoza пре 5 година
родитељ
комит
38664b0d26
1 измењених фајлова са 4 додато и 7 уклоњено
  1. 4 7
      .gitlab-ci.yml

+ 4 - 7
.gitlab-ci.yml

@@ -1,14 +1,14 @@
 build_branch:
     cache: {}
     image: docker.infra.flowdat.com/fd3/sf-php:latest
+    variables:
+      GIT_STRATEGY: clone
     script:
-      - pwd
-      - chmod 0600 keys/*
-      - eval $(ssh-agent); ssh-add keys/gogs.drone.id_rsa
+      - ssh-keyscan -p 222 -t rsa gogs.infra.flowdat.com >> ~/.ssh/known_hosts
       - git fetch --tags
       - if git ls-remote --exit-code gogs &>/dev/null; then echo 'Existe el remote gogs' ; else git remote add gogs ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/FTTH.git ; fi
       - git checkout $CI_COMMIT_REF_NAME
-      - git push -u gogs $CI_COMMIT_REF_NAME --tags
+      - chmod 0600 keys/* && eval $(ssh-agent); ssh-add keys/gogs.drone.id_rsa && git push -u gogs $CI_COMMIT_REF_NAME --tags
     only:
       - pushes
       - branches
@@ -16,7 +16,6 @@ build_branch:
 image: docker:stable
 
 services:
-  - docker:dind
   - name: mysql:5.7
     alias: mysql
   - name: rabbitmq:3-management
@@ -41,7 +40,6 @@ variables:
   HOST_RADIUS: radius.test.fd3.flowdat.com
   HOST_STATS: stats.test.fd3.flowdat.com
   HOST_DUMMY: "http://www.flowdat.com/"
-  GIT_STRATEGY: clone
 
 docker:
   stage: build
@@ -74,7 +72,6 @@ docker_version_tag:
 build:
   image: docker.infra.flowdat.com/fd3/sf-php:latest
   script:
-    - pwd
     - command -v mysqladmin >/dev/null 2>&1 || { echo "I require mysqladmin but it's not installed.  Aborting." >&2; exit 1; }
     - while ! mysqladmin ping -h mysql --silent ; do :; done
     - echo "yes" | mysqladmin -h mysql create fd3_ftth