浏览代码

Add gitlab files

Gabriel 6 年之前
父节点
当前提交
175587d0db

+ 89 - 0
.gitlab-ci.yml

@@ -0,0 +1,89 @@
+build_branch:
+  image: docker.infra.flowdat.com/fd3/sf-php:latest
+  script:
+    - chmod 0600 keys/*
+    - eval $(ssh-agent); ssh-add keys/gogs.drone.id_rsa
+    - git fetch --tags
+    - git remote add gogs ssh://git@gogs.infra.flowdat.com:222/VendorSoftwareFlowdat3/Base.git
+    - git checkout $CI_COMMIT_REF_NAME
+    - git push -u gogs $CI_COMMIT_REF_NAME --tags
+  only:
+    - pushes
+    - branches
+
+image: docker:stable
+
+services:
+  - docker:dind
+  - name: mysql:5.5
+    alias: mysql
+  - name: rabbitmq:3-management
+    alias: amqp
+
+variables:
+  MYSQL_ROOT_PASSWORD: ""
+  MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
+  CONTAINER_IMAGE: docker.infra.flowdat.com/fd3/base
+  CLIENT: fd3
+  DOMAIN: flowdat.com
+  DOCKER_USER: drone
+  DOCKER_PWD: 6hd2dLfL
+  DOCKER_HOST: tcp://docker:2375
+  DOCKER_DRIVER: overlay2
+  HOST_FTTH: ftth.fd3.flowdat.com
+  HOST_STATS: stats.fd3.flowdat.com
+  HOST_RADIUS: radius.fd3.flowdat.com
+  HOST_CABLEMODEM: cablemodem.fd3.flowdat.com
+  HOST_DHCP: dhcp.fd3.flowdat.com
+  HOST_GEOSERVER: geoserver.fd3.flowdat.com
+  HOST_BASE: base.fd3.flowdat.com
+  HOST_DHCP: dhcp.fd3.flowdat.com
+  HOST_GEOSERVER: geoserver.fd3.flowdat.com
+  MODULES_INSTALL: "base,ftth,etc"
+
+docker:
+  stage: build
+  script:
+    - docker info
+    - docker login -u $DOCKER_USER -p $DOCKER_PWD docker.infra.flowdat.com
+    - docker pull $CONTAINER_IMAGE:latest || true
+    - docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:latest .
+    - docker push $CONTAINER_IMAGE:latest
+  only:
+    refs:
+      - pushes
+    variables:
+      - $CI_COMMIT_REF_NAME == "master"
+
+docker_version_tag:
+  stage: build
+  script:
+    - docker info
+    - docker login -u $DOCKER_USER -p $DOCKER_PWD docker.infra.flowdat.com
+    - docker pull $CONTAINER_IMAGE:latest || true
+    - docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:"${CI_COMMIT_TAG##v}" .
+    - docker push $CONTAINER_IMAGE:"${CI_COMMIT_TAG##v}"
+  only:
+    refs:
+      - tags
+    variables:
+      - $CI_COMMIT_TAG =~ /^v[0-9]+(.[0-9]+)*/
+
+build:
+  image: docker.infra.flowdat.com/fd3/sf-php:latest
+  script:
+    - 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_base
+    - echo "yes" | mysqladmin -h mysql create fd_session
+    - echo 'client = Flowdat3-Base-Drone-Test' | tee /etc/flowdat.conf
+    - echo 'date.timezone="America/Argentina/Buenos_Aires"' >> /etc/php/7.0/cli/php.ini
+    - chmod 0600 keys/*
+    - eval $(ssh-agent); ssh-add keys/bitbucket.id_rsa
+    - composer install -n --no-progress
+    - composer dump-autoload --optimize
+    - chmod 0777 -R var/logs var/cache var/sessions
+    - vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
+    - bin/console check:sintax --dir="./app/DoctrineMigrations/Grupos20170627172923/" --debug=true
+  only:
+    - pushes

+ 0 - 0
.gitlab/.gitkeep


+ 0 - 0
.gitlab/issue_templates/.gitkeep


+ 30 - 0
.gitlab/issue_templates/bug.md

@@ -0,0 +1,30 @@
+### Summary
+
+(Summarize the bug encountered concisely)
+
+### Steps to reproduce
+
+(How one can reproduce the issue - this is very important)
+
+### What is the current *bug* behavior?
+
+(What actually happens)
+
+### What is the expected *correct* behavior?
+
+(What you should see instead)
+
+### Relevant logs
+
+(Paste any relevant logs - please use code blocks (```) to format console output,
+logs, and code as it's very hard to read otherwise.)
+
+### Screenshots
+
+(If a screenshot is relevant, post it here)
+
+### Possible fixes
+
+(If you can, link to the line of code that might be responsible for the problem)
+
+/label ~Bug

+ 14 - 0
.gitlab/issue_templates/feature-proposal.md

@@ -0,0 +1,14 @@
+### Problem to solve
+
+### Further details
+
+(Include use cases, benefits, and/or goals)
+
+### Proposal
+
+### What does success look like, and how can we measure that?
+
+
+### Links / references
+
+/label ~"Feature Proposal"

+ 16 - 0
.gitlab/issue_templates/improvement.md

@@ -0,0 +1,16 @@
+### What to Improve
+
+(Include a specific module, report, UI)
+
+### Further details
+
+(Include use cases, benefits, and/or goals)
+
+### Proposal
+
+### What does success look like, and how can we measure that?
+
+
+### Links / references
+
+/label ~"improvement"

+ 17 - 0
.gitlab/issue_templates/research.md

@@ -0,0 +1,17 @@
+### Background:
+    
+    (Include problem, use cases, benefits, and/or goals)
+    
+    **What questions are you trying to answer?**
+    
+    **Are you looking to verify an existing hypothesis or uncover new issues you should be exploring?**
+    
+    **What is the backstory of this project and how does it impact the approach?**
+    
+    **What do you already know about the areas you are exploring?**
+    
+    **What does success look like at the end of the project?**
+    
+    ### Links / references:
+    
+    /label ~"Research"

+ 31 - 0
.gitlab/issue_templates/test.md

@@ -0,0 +1,31 @@
+# Test Plan
+    
+    <!-- This issue outlines testing activities related to a particular issue or epic.
+    This and other comments should be removed as you write the plan -->
+    
+    ## Introduction
+    
+    <!-- Briefly outline what is being tested
+    
+    Mention the issue(s) this test plan is related to -->
+    
+    ## Scope
+    
+    <!-- State any limits on aspects of the feature being tested
+    Outline the types of data to be included
+    Outline the types of tests to be performed (functional, security, performance,
+    database, automated, etc) -->
+    
+    
+    ## Test Plan
+    
+    <!-- If the scope is small enough you may not need to write a list of tests to
+    perform. It might be enough to use the Capabilities to guide your testing.
+    
+    If the feature is more complex, especially if it involves multiple Components,
+    briefly outline a set of tests here. When identifying tests to perform be sure
+    to consider risk. 
+    
+    -->
+    
+    /label ~Quality

+ 0 - 0
.gitlab/merge_request_templates/.gitkeep


+ 16 - 0
.gitlab/merge_request_templates/template.md

@@ -0,0 +1,16 @@
+## What does this MR do?
+
+<!-- Briefly describe what this MR is about -->
+
+## Related issues
+
+<!-- Mention the issue(s) this MR closes or is related to -->
+
+Closes 
+
+## Review checklist
+
+- [ ] Your team's review (required)
+- [ ] PM's review (recommended, but not a blocker)
+
+/label ~Documentation