This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add concourse pipeline configuration
Signed-off-by: Ka Hin Ng <kang@pivotal.io>
- Loading branch information
Vladimir Kasatkin
committed
Apr 17, 2018
1 parent
d76d81e
commit fb670d5
Showing
6 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ spec/tmp/ | |
.vagrant | ||
gems.tags | ||
.byebug_history | ||
*credentials*.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
resources: | ||
- name: project-monitor-repo | ||
type: git | ||
source: | ||
uri: "https://github.com/pivotal/projectmonitor.git" | ||
|
||
- name: cf-deploy | ||
type: cf | ||
source: | ||
api: ((api-endpoint)) | ||
username: ((cf-username)) | ||
password: ((cf-password)) | ||
organization: ((cf-org)) | ||
space: ((cf-space)) | ||
skip_cert_check: true | ||
|
||
jobs: | ||
- name: unit-tests | ||
plan: | ||
- get: project-monitor-repo | ||
trigger: true | ||
- task: Run all unit tests | ||
timeout: 59m | ||
file: project-monitor-repo/concourse/tasks/concourse-unit-tests.yml | ||
|
||
- name: deploy-projectmonitor | ||
plan: | ||
- get: project-monitor-repo | ||
trigger: true | ||
passed: [unit-tests] | ||
- task: deploy-projectmonitor | ||
file: project-monitor-repo/concourse/tasks/prepare-deployment.yml | ||
params: | ||
PROJECTMONITOR_HOST: ((projectmonitor-host)) | ||
PROJECTMONITOR_DOMAIN: ((projectmonitor-domain)) | ||
output_mapping: {prepared-deployment: prepared-deployment} | ||
- put: cf-deploy | ||
params: | ||
path: prepared-deployment | ||
manifest: prepared-deployment/manifest.yml | ||
current_app_name: project-monitor-web | ||
show_app_log: true | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
cd project-monitor-repo | ||
|
||
cp config/database.yml.example config/database.yml | ||
|
||
sed -i -e 's/${HOST}/'"$PROJECTMONITOR_HOST"'/' manifest.yml | ||
sed -i -e 's/${DOMAIN}/'"$PROJECTMONITOR_DOMAIN"'/' manifest.yml | ||
|
||
cp -a . ../prepared-deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
cd project-monitor-repo | ||
|
||
rbenv exec bundle install | ||
|
||
cp config/database.yml.example config/database.yml | ||
|
||
chown -R mysql:mysql /var/lib/mysql && service mysql start | ||
|
||
RAILS_ENV=test rbenv exec rake db:create | ||
RAILS_ENV=test rbenv exec rake db:migrate | ||
|
||
xvfb-run -a rbenv exec rake spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
platform: linux | ||
|
||
image_resource: | ||
type: docker-image | ||
source: | ||
repository: pivotaliad/project-monitor | ||
|
||
inputs: | ||
- name: project-monitor-repo | ||
|
||
run: | ||
path: project-monitor-repo/concourse/scripts/run-tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
params: | ||
PROJECTMONITOR_HOST: | ||
PROJECTMONITOR_DOMAIN: | ||
|
||
platform: linux | ||
|
||
image_resource: | ||
type: docker-image | ||
source: | ||
repository: pivotaliad/project-monitor | ||
|
||
inputs: | ||
- name: project-monitor-repo | ||
|
||
run: | ||
path: project-monitor-repo/concourse/scripts/prepare-deployment-manifest.sh | ||
|
||
outputs: | ||
- name: prepared-deployment |