0
gitlab ciを使用したことはありませんでした。私はまともな方法で来て、私の最後のセクションで、Gulpの出力をアーティファクトzipに含めるようにしました。Gitlab CIアーティファクトから特定のフォルダを作成します。
だから現在私のビルド.ymlファイルには、次のようになります。あなたは獣のそのビットを見たが、それは作品として
cache:
paths:
- vendor/
- node_modules/
before_script:
# Install git (the php image doesn't have it) which is required by composer
- apt-get update -yqq
- apt-get install git unzip -yqq
- apt-get install php-pear -yqq
# Install composer
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
# Setup PHPCompatibility for php_codesniffer
- mkdir --parents vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility
- cp -R vendor/wimg/php-compatibility/* vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility
stages:
- compatibility_test
- coding_standards
- gulp_build
- gulp_package
# Compatibility Test
PHP 5.2 Compatibility Test:
image: php:5.6
stage: compatibility_test
script:
- vendor/bin/phpcs -d date.timezone=GMT --standard=PHPCompatibility --runtime-set testVersion 5.2 src/ --report-full --report-summary --extensions=php
PHP 5.3 Compatibility Test:
image: php:5.6
stage: compatibility_test
script:
- vendor/bin/phpcs -d date.timezone=GMT --standard=PHPCompatibility --runtime-set testVersion 5.3 src/ --report-full --report-summary --extensions=php
PHP 5.4 Compatibility Test:
image: php:5.6
stage: compatibility_test
script:
- vendor/bin/phpcs -d date.timezone=GMT --standard=PHPCompatibility --runtime-set testVersion 5.4 src/ --report-full --report-summary --extensions=php
PHP 5.5 Compatibility Test:
image: php:5.6
stage: compatibility_test
script:
- vendor/bin/phpcs -d date.timezone=GMT --standard=PHPCompatibility --runtime-set testVersion 5.5 src/ --report-full --report-summary --extensions=php
PHP 5.6 Compatibility Test:
image: php:5.6
stage: compatibility_test
script:
- vendor/bin/phpcs -d date.timezone=GMT --standard=PHPCompatibility --runtime-set testVersion 5.6 src/ --report-full --report-summary --extensions=php
PHP 7.0 Compatibility Test:
image: php:5.6
stage: compatibility_test
script:
- vendor/bin/phpcs -d date.timezone=GMT --standard=PHPCompatibility --runtime-set testVersion 7.0 src/ --report-full --report-summary --extensions=php
PHP 7.1 Compatibility Test:
image: php:5.6
stage: compatibility_test
script:
- vendor/bin/phpcs -d date.timezone=GMT --standard=PHPCompatibility --runtime-set testVersion 7.1 src/ --report-full --report-summary --extensions=php
# # Coding Standards Test
PHP Coding Standards:
image: php:5.6
stage: Coding Standards
script:
- vendor/bin/phpcs -s --standard=ruleset.xml src/ --report-full --report-summary --extensions=php
JS Coding Standards:
image: php:5.6
stage: Coding Standards
script:
- vendor/bin/phpcs -s --standard=ruleset.xml src/js/ --report-full --report-summary --extensions=js
CSS Coding Standards:
image: php:5.6
stage: Coding Standards
script:
- vendor/bin/phpcs -s --standard=ruleset.xml src/css/ --report-full --report-summary --extensions=css
# Gulp Build
Gulp:
image: node:latest
stage: gulp_build
script:
- npm install -g gulp
- npm install
- gulp build
- gulp zip
artifacts:
name: "my-build"
expire_in: 1 week
paths:
- "dist/*"
。私が持っている最後の部分は、ガルプ:アーティファクトファイルには、その名前を生成し、現在
# Gulp Build
Gulp:
image: node:latest
stage: gulp_build
script:
- npm install -g gulp
- npm install
- gulp build
- gulp zip
artifacts:
name: "my-build"
expire_in: 1 week
paths:
- "dist/*"
は完璧であるmy-build.zipとしてショーです。しかし、その中のフォルダはdistです。 distフォルダをmy-buildに変更する方法はありますか?
乾杯、
ステュー