0
몇 주 전에 gitlab ci를 사용해 본 경험이 있습니다. 필자는 필자의 최종 섹션에서 Gulp의 출력물을 artifacts zip에 포함되도록했습니다.Gulp로 빌드 한 후 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로 변경하는 방법이 있습니까?
건배,
스투