acms拡張機能開発で継続的インテグレーション(CI)
a-blog cmsの拡張機能開発にBitbucketのCIツールであるPipelinesを導入しました。
bitbucket-pipelines.yml
# Bitbucketにpushした時にCIを行うための設定ファイル # Pipelinesを参照 # Docker Image running nodejs and php(composer) image: yoshi0207/acms_extension:latest pipelines: default: - parallel: - step: name: Build and Test caches: - node - composer script: - npm install - composer install - composer update - npm test - composer test - step: name: Lint the node and composer package script: - npm install - composer install - composer update - npx eslint . - ./vendor/bin/phplint ./ --exclude=vendor - ./vendor/bin/phpcs --standard=phpcs.xml . --colors -p -n caches: - node - composer branches: develop: - parallel: - step: name: Build and Test caches: - node - composer script: - npm install - composer install - composer update - npm test - composer test - step: name: Lint the node and composer package script: - npm install - composer install - composer update - npx eslint . - ./vendor/bin/phplint ./ --exclude=vendor - ./vendor/bin/phpcs --standard=phpcs.xml . --colors -p -n caches: - node - composer master: - parallel: - step: name: Build and Test caches: - node - composer script: - npm install - npm test - step: name: Security Scan script: # Run a security scan for sensitive data. # See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security - pipe: atlassian/git-secrets-scan:0.4.3
使用しているイメージについて
composerとnodeJSが動作するイメージを用意しました。軽量linuxであるalpineを使用しているので、軽いです(たぶん)。