Skip to content

Commit b44fe72

Browse files
author
Kurt McAlpine
authored
Merge pull request #1 from nathgs/master
Allow pull requests from a 'master' branch + EROAD pipeline.
2 parents b085308 + 50e8a33 commit b44fe72

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
example/
33
.bundle
44
bin
5+
6+
.idea
7+
.idea/*

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ resource_types:
1616
- name: pull-request
1717
type: docker-image
1818
source:
19-
repository: jtarchie/pr
19+
repository: eroad/pr
2020
```
2121
2222
## Source Configuration

Diff for: assets/lib/in.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ def ref
1919

2020
pr = Octokit.pull_request(input['source']['repo'], input['version']['pr'])
2121
id = pr['number']
22-
branch_ref = pr['head']['ref']
22+
23+
# EROAD XXX: Use 'tmp' because pr['head']['ref'] assumes people don't make pull requests from their 'master' branch.
24+
#branch_ref = pr['head']['ref']
25+
branch_ref = 'tmp'
2326

2427
system("git clone --depth 1 #{uri} #{destination} 1>&2")
2528

Diff for: ci/pipeline.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
resources:
2+
3+
- name: pullrequest-resource
4+
type: git
5+
check_every: 10s
6+
source:
7+
uri: https://github.com/eroad/pullrequest-resource.git
8+
branch: master
9+
username: {{github-username}}
10+
password: {{github-password}}
11+
12+
- name: image
13+
type: docker-image
14+
source:
15+
repository: eroadltd/pr
16+
username: {{docker-username}}
17+
password: {{docker-password}}
18+
19+
jobs:
20+
21+
- name: docker-build
22+
serial: true
23+
plan:
24+
- aggregate:
25+
- get: pullrequest-resource
26+
trigger: true
27+
- put: image
28+
params:
29+
build: pullrequest-resource

0 commit comments

Comments
 (0)