enomotodev / gitlabci-composer-update-mr
Create MergeRequest of composer update in GitLabCI
Installs: 2 120
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 2
Forks: 3
Open Issues: 1
Requires
- php: ^5.6 || ^7.0
- enomotodev/composer-lock-diff: ^1.0
- m4tthumphrey/php-gitlab-api: ^9.11
- php-http/guzzle6-adapter: ^1.0
Requires (Dev)
- phpunit/phpunit: ^5.7
README
Installation
$ composer require enomotodev/gitlabci-composer-update-mr
Prerequisites
The application on which you want to run continuous composer update must be configured to be built on GitLabCI.
Usage
Setting GitLab personal access token to GitLabCI
GitLab personal access token is required for sending merge requests to your repository.
- Go to your account's settings page and generate a personal access token with "api" scope
- On GitLab dashboard, go to your application's "Settings" -> "CI /CD" -> "Environment variables"
- Add an environment variable
GITLAB_API_PRIVATE_TOKEN
with your GitLab personal access token
Configure .gitlab-ci.yml
Configure your .gitlab-ci.yml
to run gitlabci-composer-update-mr
, for example:
job: except: - schedules script: # snip job:on-schedule: image: composer:latest only: - schedules script: - "composer global require enomotodev/gitlabci-composer-update-mr" - "$COMPOSER_HOME/vendor/bin/gitlabci-composer-update-mr <username> <email> master"
NOTE: Please make sure you replace <username>
and <email>
with yours.
Setting Schedule
- On GitLab dashboard, go to your application's "Schedules" -> "New schedule"
- Create new schedule and save
CLI command references
General usage:
$ gitlabci-composer-update-mr <git username> <git email address> <git base branch>
License
gitlabci-composer-update-mr is open-sourced software licensed under the MIT license