GithubHelp home page GithubHelp logo

00mjk / gitlab-merge-request-resource-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swisscom/gitlab-merge-request-resource

0.0 0.0 0.0 62 KB

A concourse resource to check for new merge requests on GitLab

License: Other

Shell 99.04% Dockerfile 0.96%

gitlab-merge-request-resource-1's Introduction

GitLab Merge Request Concourse Resource

A concourse resource to check for new merge requests on GitLab and update the merge request status.

Source Configuration

resource_types:
- name: merge-request
  type: docker-image
  source:
    repository: mastertinner/gitlab-merge-request-resource

resources:
- name: repo-mr
  type: merge-request
  source:
    uri: https://gitlab.com/myname/myproject.git
    private_token: XXX
    username: my_username
    password: xxx
  • uri: The location of the repository (required)

  • private_token: Your GitLab user's private token (required, can be found in your profile settings)

  • private_key: The private SSH key for SSH auth when pulling

    Example:

    private_key: |
      -----BEGIN RSA PRIVATE KEY-----
      MIIEowIBAAKCAQEAtCS10/f7W7lkQaSgD/mVeaSOvSF9ql4hf/zfMwfVGgHWjj+W
      <Lots more text>
      DWiJL+OFeg9kawcUL6hQ8JeXPhlImG6RTUffma9+iGQyyBMCGd1l
      -----END RSA PRIVATE KEY-----
  • username: The username for HTTP(S) auth when pulling

  • password: The password for HTTP(S) auth when pulling

  • no_ssl: Set to true if the GitLab API should be used over HTTP instead of HTTPS

  • skip_ssl_verification: Optional. Connect to GitLab insecurely - i.e. skip SSL validation. Defaults to false if not provided.

Please note that you have to provide either private_key or username and password.

Behavior

check: Check for new merge requests

Checks if there are new merge requests or merge requests with new commits.

in: Clone merge request source branch

git clones the source branch of the respective merge request.

out: Update a merge request's merge status

Updates the merge request's merge_status which displays nicely in the GitLab UI and allows to only merge changes if they pass the test.

Parameters

  • repository: The path of the repository of the merge request's source branch (required)
  • status: The new status of the merge request (required, can be either pending, running, success, failed, or canceled)
  • build_label: The label of the build in GitLab (optional, defaults to "Concourse")

Example

jobs:
- name: test-merge-request
  plan:
  - get: repo
    resource: repo-mr
    trigger: true
  - put: repo-mr
    params:
      repository: repo
      status: running
  - task: run-tests
    file: repo/ci/tasks/run-tests.yml
  on_failure:
    put: repo-mr
    params:
      repository: repo
      status: failed
  on_success:
    put: repo-mr
    params:
      repository: repo
      status: success

gitlab-merge-request-resource-1's People

Contributors

ampersand8 avatar elfolink avatar jamesclonk avatar lorand-plensys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.