Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2 minor - added Dockerfile and mocked up pipeline. #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ruby:2.3
RUN apt-get update && \
apt-get install -y cmake
COPY wincrementor.rb ./wincrementor.rb
COPY Gemfile ./Gemfile
RUN bundle install
17 changes: 17 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source "https://rubygems.org"
#pdfkit and kramdown reqires sudo apt-get install wkhtmltopdf on the machines
gem 'mercurial-ruby', :require => false
gem 'pdfkit'
gem 'rake'
gem 'rugged', '~> 0.24.0'
gem 'trac4r', :require => false
gem 'docopt'
gem 'ruby-fogbugz', :require => false
gem 'flexmock'
gem 'zip'
gem 'liquid'
gem 'xml-simple', '~> 1.1', '>= 1.1.5'
gem 'simplecov'
gem 'simplecov-rcov'
gem 'ci_reporter_test_unit'
gem 'rspec'
113 changes: 113 additions & 0 deletions pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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}}