Skip to content

Instantly share code, notes, and snippets.

@Espina2
Created May 23, 2020 16:36
Show Gist options
  • Save Espina2/5fe434969350af8668017ad94c220f9a to your computer and use it in GitHub Desktop.
Save Espina2/5fe434969350af8668017ad94c220f9a to your computer and use it in GitHub Desktop.
---
resource_types:
- name: pull-request
type: registry-image
source:
repository: mastertinner/gitlab-merge-request-resource
resources:
- name: pr-code
type: pull-request
icon: source-pull
source:
uri: https://gitlab.com/3cket/backoffice-ui.git
private_token: ((gitlab.private_token))
username: ((gitlab.username))
password: ((gitlab.private_token))
- name: ci
type: git
icon: github-circle
source:
uri: git@github.com:3cket/ci.git
private_key: ((github.private_key))
- name: vue-image
type: registry-image
icon: docker
source:
repository: registry.gitlab.com/3cket/docker-images/vue
tag: "1.1"
username: ((gitlab.username))
password: ((gitlab.private_token))
groups:
- name: prs
jobs:
- unit-tests
jobs:
- name: unit-tests
serial: true
max_in_flight: 2
on_failure:
put: pr-code
params:
repository: pr-code
status: failed
build_label: unit
on_abort:
put: pr-code
params:
repository: pr-code
status: canceled
build_label: unit
on_success:
put: pr-code
params:
repository: pr-code
status: success
build_label: unit
plan:
- in_parallel:
- get: pr-code
trigger: true
- get: vue-image
- get: ci
- in_parallel:
- put: pr-code
params:
repository: pr-code
status: running
build_label: unit
- task: unit
image: go-image
file: ci/tasks/yarn-install.yml
input_mapping: {code: pr-code}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment