2016-10-18 3 views
1

gitlab CI의 image: ruby:2.3.1을 사용하고 있습니다. 다음 패키지를 배포해야합니다.gitlab-ci.yml의 GitLab CI에 최신 도구 (Ruby, Node.js, Bower, Grunt, Jekyll)를 모두 배포하는 방법

  1. NPM의 v3.10.3
  2. 바우어의 v1.7.9
  3. 그런트
  4. 번들 v1.13.2
  5. 지킬의 V3.3.0 확인하는 방법 또한

각 빌드 gitlab는 것을 이러한 패키지를 다시 다운로드하지 마십시오 (다시 사용 가능함을 의미합니다)

+0

많은 노력의 결과로이 코드가 작동하는 것을 알았습니다. :). 좋은 사람들이 나눔을 나눌 수 있습니다. 이 스크립트는 gitlab-ci에서 번거 로움없는 개발을위한 대부분의 도구를 설치합니다. Gitlab rocks – SACn

답변

6

많은 양의 eff 오트,이 코드가 작동하는 것을 알았습니다 :). 좋은 사람들과 나눔. 이 스크립트는 gitlab-ci에서 번거 로움없는 개발을위한 대부분의 도구를 설치합니다. Gitlab 바위

image: ruby:2.3.1 

cache: 
    paths: 
    - bower_components/ 
    - node_modules/ 

before_script: 
    - ruby -v 
    - apt-get update -y 
    - apt-get install -y libssl-dev build-essential wget 
    - wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash 
    - source /root/.bashrc 
    - nvm install 6.6.0 
    - nvm use 6.6.0 
    - node -v 
    - npm -v 
    - npm install  
    - npm install -g [email protected] 
    - bower -v 
    - bower install --allow-root 
    - npm install -g [email protected] 
    - npm install -g [email protected] 
    - grunt --version 
    - gem install bundler -v '1.13.2' 
    - bundle --version 
    - bundle install 
    - gem install jekyll -v '3.3.0' 
    - jekyll --version 

pages: 
    stage: deploy 
    script: 
    - grunt fullbuild 
    artifacts: 
     paths: 
     - _site 

only: 
    - master 
+0

설치 노드 이것은 GitLab CI/CD에서 작동하도록 npm 명령을 얻은 유일한 방법입니다. 감사합니다! –