Node.JS
ReactJS
Grunt
we use it to
Advantages
sample config
stages:
- build
- review
- test
- deploy
sonar:
stage: test
script:
- sonar-scanner -Dsonar.host.url=http://sonar.adyax-dev.com -Dsonar.analysis.mode=preview -Dsonar.issuesReport.console.enable=true -Dsonar.gitlab.commit_sha=$CI_BUILD_REF -Dsonar.gitlab.ref=$CI_BUILD_REF_NAME
only:
- branches
except:
- develop
cs_review:
stage: test
# Select image from https://hub.docker.com/_/php/
image: php:7.1
tags:
- docker
# Select what we should cache
cache:
paths:
- vendor/
- docroot/modules/contrib/
- bin/
before_script:
# Install all project dependencies
# ...
script:
- echo "Review module,php,install,js for Drupal standards"
# - composer install
- ~/.composer/vendor/bin/phpcs --colors --standard=DrupalPractice --encoding=utf-8 -p --extensions=module/php,php,install/php,js,yml ./docroot/modules/custom/
- ~/.composer/vendor/bin/phpcs --colors --standard=Drupal --encoding=utf-8 -p --extensions=module/php,php,install/php,js ./docroot/modules/custom/
only:
- branches
except:
- develop
allow_failure: true
deploy_dev:
stage: deploy
script:
- ssh ush@ushlogements.adyax.net 'bash -s' < ./scripts/ci/dev-deployment.sh
only:
- develop
review:
stage: review
script:
- export COMPOSER_DISCARD_CHANGES=true
- composer install --no-dev
- rsync -av --delete ./ /var/www/review/$CI_BUILD_REF_SLUG
- cd /var/www/review/$CI_BUILD_REF_SLUG/docroot
# Create_DB
- echo "CREATE DATABASE IF NOT EXISTS \`ushlogements_$CI_BUILD_REF_SLUG\`" | mysql -uush -paIqtYDqZAnm5I6F
# Create_settings
- sed -i -- "s/CI_BUILD_REF_SLUG/$CI_BUILD_REF_SLUG/g" ../environments/review/settings.php
#- cp ../environments/review/settings.php ./sites/default/settings.php
- mkdir drush
- cp ../scripts/ci/logements.aliases.drushrc.php ./drush/logements.aliases.drushrc.php
# Sync DB from Dev
- drush sql-sync @logements.dev default -y
- drush cr
- drush cim -y
- drush updb -y
- drush entity-updates -y
environment:
name: review/$CI_BUILD_REF_NAME
url: http://$CI_BUILD_REF_SLUG.review.ushlogements.adyax-dev.com
on_stop: stop_review
when: manual
only:
- branches
except:
- master
tags:
- nginx
- review-apps
- deploy
- ush
stop_review:
stage: review
script:
- rm -rf /var/www/review/$CI_BUILD_REF_SLUG
# DROP_DB
- echo "DROP database \`ushlogements_$CI_BUILD_REF_SLUG\`" | mysql -uush -paIqtYDqZAnm5I6F
variables:
GIT_STRATEGY: none
when: manual
environment:
name: review/$CI_BUILD_REF_NAME
action: stop
tags:
- nginx
- review-apps
- deploy
- ush
https://code.adyax.com/snippets/39
runners
Scrum teams care very much about their code quality.
Ensure the quality is above accepted threshold.
Sonar (Cyclomatic Complexity, Cognitive complexity, Code smell, Bug, Vulnerability, etc)
Code Task
Code Task
https://sites.google.com/a/adyax.com/knowledge-base/departments/development/standards/code-review
Code Task
http://sonar.adyax-dev.com/
Continuous Code Quality
Code Task
What if I say
that you can do review on
a dynamic environment?
Devs write tests!
@api @d8
Feature: Language support
In order to demonstrate the language integration
As a developer for the Behat Extension
I need to provide test cases for the language support
Scenario: Enable multiple languages # features/language.feature:11
Given the following languages are available: # Drupal\DrupalExtension\Context\DrupalContext::createLanguages()
| languages |
| en |
| fr |
When I visit "/" # Drupal\DrupalExtension\Context\MinkContext::assertAtPath()
└─ @AfterStep # Devinci\DevinciExtension\Context\DebugContext::dumpAssetsAfterFailedStep()
Then I should see "Username" # Drupal\DrupalExtension\Context\MinkContext::assertPageContainsText()
Then I should see "Password" # Drupal\DrupalExtension\Context\MinkContext::assertPageContainsText()
And I fill in the following: # Drupal\DrupalExtension\Context\MinkContext::fillFields()
| Username | admin |
| Password | admin |
And press "Log in" # Drupal\DrupalExtension\Context\MinkContext::pressButton()
When I go to "admin/config/regional/language" # Drupal\DrupalExtension\Context\MinkContext::visit()
Then I should see "English" # Drupal\DrupalExtension\Context\MinkContext::assertPageContainsText()
And I should see "French"Executed in CI
Adyax Jenkins http://auto.adyax.com/
Adyax Zebra http://jenkins.proto.zebra.adyax-dev.com/