Gitlab CI에서 ruby gems 업데이트 및 MR 자동 생성이 가능합니다.
4939 단어 dependabotRailsGitLabCiGitLab
사전 준비
.gitlab-ci.yml 조정
ruby gems 업데이트를 위한 Job 추가
dependabot/dependabot-core
컨테이너에 원하는 버전의 루비가 없을 수 있으므로 rbenv
를 사용하여 설치하십시오.
※프로젝트의 부하에 ruby
의 버젼을 기재하고 있는 .ruby-version
가 있다고 합니다.
작업 추가 후 .gitlab-ci.yml
파일
.gitlab-ci.ymldependabot:
image: dependabot/dependabot-core
before_script:
- git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
- git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
- echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
- echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
- source ~/.bash_profile
- rbenv install -v `cat ./.ruby-version` --skip-existing
- rbenv global `cat ./.ruby-version`
- gem install bundler
- bundle install -j $(nproc) --path vendor
- curl -O https://raw.githubusercontent.com/dependabot/dependabot-script/master/generic-update-script.rb
- curl -O https://raw.githubusercontent.com/dependabot/dependabot-script/master/update-script.rb
script:
- bundle exec ruby ./generic-update-script.rb
only:
- schedules
.gitlab-ci.yml에있는 dependabot 이외의 Job에 except : schedules 추가
ruby gems의 갱신만이므로, rspec/lint등의 실행은 필요 없습니다
.gitlab-ci.yml...
brakeman:
stage: audit
tags:
- docker
- gce
except:
- schedules
script:
- bundle exec brakeman -4 -A -w 1 -z
...
Schedule에 Job 등록
움직일 수 있는지 시도해보십시오.
두 개의 젬 버조 업이 있었던 것 같습니다.
MR 목록 확인
확실히, 두 개의 MR이 올랐다.
좋은 느낌이 완성되었습니다
그리고는, 녹색의 merge
버튼을 클릭만.
Reference
이 문제에 관하여(Gitlab CI에서 ruby gems 업데이트 및 MR 자동 생성이 가능합니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/shaodi/items/204170a9d79cc575a301
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
dependabot:
image: dependabot/dependabot-core
before_script:
- git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
- git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
- echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
- echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
- source ~/.bash_profile
- rbenv install -v `cat ./.ruby-version` --skip-existing
- rbenv global `cat ./.ruby-version`
- gem install bundler
- bundle install -j $(nproc) --path vendor
- curl -O https://raw.githubusercontent.com/dependabot/dependabot-script/master/generic-update-script.rb
- curl -O https://raw.githubusercontent.com/dependabot/dependabot-script/master/update-script.rb
script:
- bundle exec ruby ./generic-update-script.rb
only:
- schedules
...
brakeman:
stage: audit
tags:
- docker
- gce
except:
- schedules
script:
- bundle exec brakeman -4 -A -w 1 -z
...
움직일 수 있는지 시도해보십시오.
두 개의 젬 버조 업이 있었던 것 같습니다.
MR 목록 확인
확실히, 두 개의 MR이 올랐다.
좋은 느낌이 완성되었습니다
그리고는, 녹색의 merge
버튼을 클릭만.
Reference
이 문제에 관하여(Gitlab CI에서 ruby gems 업데이트 및 MR 자동 생성이 가능합니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/shaodi/items/204170a9d79cc575a301
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
MR 목록 확인
확실히, 두 개의 MR이 올랐다.
좋은 느낌이 완성되었습니다
그리고는, 녹색의 merge
버튼을 클릭만.
Reference
이 문제에 관하여(Gitlab CI에서 ruby gems 업데이트 및 MR 자동 생성이 가능합니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/shaodi/items/204170a9d79cc575a301
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
Reference
이 문제에 관하여(Gitlab CI에서 ruby gems 업데이트 및 MR 자동 생성이 가능합니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/shaodi/items/204170a9d79cc575a301텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)