Skip to content

enomotodev/gitlabci-composer-update-mr

Repository files navigation

gitlabci-composer-update-mr

Latest Stable Version Build Status

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.

  1. Go to your account's settings page and generate a personal access token with "api" scope
  2. On GitLab dashboard, go to your application's "Settings" -> "CI /CD" -> "Environment variables"
  3. 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

  1. On GitLab dashboard, go to your application's "Schedules" -> "New schedule"
  2. 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

About

Create MergeRequest of composer update in GitLabCI

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages