-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpipeline.yml
113 lines (105 loc) · 2.82 KB
/
pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
jobs:
- name: wincrement-version
public: true
plan:
- get: version
- get: tollgate
trigger: true
- task: version
config:
platform: linux
image_resource:
type: docker-image
source:
repository: sharor/wincrementor
tag: "1.0.0"
inputs:
- name: tollgate
outputs:
- name: versioned-tollgate
run:
path: sh
args:
- -exc
- |
echo "- - - - - - - - - - Setup for modifying version on commit - - - - - - - - - -"
cd tollgate && git config --global user.email "[email protected]" && git config --global user.name "ConcourseCI"
ssh-keyscan github.com && git fetch && current=$(cat version) && originprefix="origin"
git branch -a --list
branch=$(git branch -r --list 'origin/wip/*') && wip=${branch#" origin/"}
echo "- - - - - - - - - - Determine new version - - - - - - - - - -"
echo $(ruby /wincrementor.rb origin/master $current)>version
git add version && git commit --amend --reuse-message HEAD
mv version ../versioned-tollgate/version
- put: tollgate
params:
repository: tollgate
timeout: 5m
- put: version
params: {file: versioned-tollgate/version}
#- name: build
# plan:
# - get: repository
# trigger: true
# - get: version
# passed: [wincrement-version]
# - put: docker-image
# params:
# build: repository
# cache: false
# tag: version/version
# tag_as_latest: true
# on_failure:
# put: slack-alert
# params:
# channel: '#concoursebuildresults'
# text_file: |
# text: |
## The build failed for wincrementor.
resource_types:
#- name: slack-notification
# type: docker-image
# source:
# repository: cfcommunity/slack-notification-resource
# tag: latest
- name: tollgate
type: docker-image
source:
repository: groenborg/concourse-git-phlow
tag: '1.0.22'
resources:
#- name: repository
# type: git
# source:
# uri: [email protected]:Sharor/testrepo.git
# branch: mimicready
# private_key: {{concourse-token}}
#- name: slack-alert
# type: slack-notification
# source:
# url: {{slack-praqma}}
#- name: docker-image
# type: docker-image
# source:
# email: {{docker-hub-email}}
# username: {{docker-hub-username}}
# password: {{docker-hub-password}}
# repository: {{docker-repo}}
- name: version
type: semver
source:
driver: git
initial_version: 0.0.0
uri: [email protected]:Sharor/testrepo.git
branch: version
file: version
private_key: {{concourse-token}}
- name: tollgate
type: tollgate
source:
prefixready: ready/
prefixwip: wip/
master: master
url: https://github.com/Sharor/testrepo.git
username: {{github-username}}
password: {{github-password}}