Skip to content

Commit

Permalink
CRLF -> LF
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Lavigne committed Jan 2, 2017
1 parent 2f5b2fb commit 426bb56
Show file tree
Hide file tree
Showing 3 changed files with 302 additions and 302 deletions.
144 changes: 72 additions & 72 deletions .bluemix/catalog-api.pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
---
stages:
- name: BUILD
inputs:
- type: git
branch: ${REPO_BRANCH}
service: ${REPO}
triggers:
- type: commit
jobs:
- name: Build
type: builder
- name: DEPLOY
inputs:
- type: job
stage: BUILD
job: Build
triggers:
- type: stage
properties:
- name: REPO_BRANCH
value: ${REPO_BRANCH}
jobs:
- name: Blue/Green Deploy
type: deployer
target:
region_id: ${REGION_ID}
organization: ${ORG_NAME}
space: ${SPACE_NAME}
application: ${CF_APP_NAME}
script: |-
#!/bin/bash
# The branch may use a custom manifest
MANIFEST=manifest.yml
if [ -f ${REPO_BRANCH}-manifest.yml ]; then
MANIFEST=${REPO_BRANCH}-manifest.yml
fi
echo "Using manifest file: $MANIFEST"
# and a prefix for services if not building the master branch
if [ "$REPO_BRANCH" == "master" ]; then
echo "No prefix for master branch"
PREFIX=""
else
PREFIX=$REPO_BRANCH"-"
echo "Using prefix: $PREFIX"
fi
# Create CF services
cf create-service cloudantNoSQLDB Lite ${PREFIX}insurance-policy-db
cf create-service tradeoff_analytics standard insurance-tradeoff-analytics
if ! cf app $CF_APP; then
cf push $CF_APP -n $CF_APP -f $MANIFEST
else
OLD_CF_APP=${CF_APP}-OLD-$(date +"%s")
rollback() {
set +e
if cf app $OLD_CF_APP; then
cf logs $CF_APP --recent
cf delete $CF_APP -f
cf rename $OLD_CF_APP $CF_APP
fi
exit 1
}
set -e
trap rollback ERR
cf rename $CF_APP $OLD_CF_APP
cf push $CF_APP -n $CF_APP -f $MANIFEST
cf delete $OLD_CF_APP -f
fi
---
stages:
- name: BUILD
inputs:
- type: git
branch: ${REPO_BRANCH}
service: ${REPO}
triggers:
- type: commit
jobs:
- name: Build
type: builder
- name: DEPLOY
inputs:
- type: job
stage: BUILD
job: Build
triggers:
- type: stage
properties:
- name: REPO_BRANCH
value: ${REPO_BRANCH}
jobs:
- name: Blue/Green Deploy
type: deployer
target:
region_id: ${REGION_ID}
organization: ${ORG_NAME}
space: ${SPACE_NAME}
application: ${CF_APP_NAME}
script: |-
#!/bin/bash
# The branch may use a custom manifest
MANIFEST=manifest.yml
if [ -f ${REPO_BRANCH}-manifest.yml ]; then
MANIFEST=${REPO_BRANCH}-manifest.yml
fi
echo "Using manifest file: $MANIFEST"
# and a prefix for services if not building the master branch
if [ "$REPO_BRANCH" == "master" ]; then
echo "No prefix for master branch"
PREFIX=""
else
PREFIX=$REPO_BRANCH"-"
echo "Using prefix: $PREFIX"
fi
# Create CF services
cf create-service cloudantNoSQLDB Lite ${PREFIX}insurance-policy-db
cf create-service tradeoff_analytics standard insurance-tradeoff-analytics
if ! cf app $CF_APP; then
cf push $CF_APP -n $CF_APP -f $MANIFEST
else
OLD_CF_APP=${CF_APP}-OLD-$(date +"%s")
rollback() {
set +e
if cf app $OLD_CF_APP; then
cf logs $CF_APP --recent
cf delete $CF_APP -f
cf rename $OLD_CF_APP $CF_APP
fi
exit 1
}
set -e
trap rollback ERR
cf rename $CF_APP $OLD_CF_APP
cf push $CF_APP -n $CF_APP -f $MANIFEST
cf delete $OLD_CF_APP -f
fi
176 changes: 88 additions & 88 deletions .bluemix/order-api.pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,88 +1,88 @@
---
stages:
- name: BUILD
inputs:
- type: git
branch: ${REPO_BRANCH}
service: ${REPO}
triggers:
- type: commit
jobs:
- name: Build
type: builder
- name: DEPLOY
inputs:
- type: job
stage: BUILD
job: Build
triggers:
- type: stage
properties:
- name: REPO_BRANCH
value: ${REPO_BRANCH}
- name: CATALOG_APP_NAME
value: ${CATALOG_APP_NAME}
- name: REGION_ID
value: ${REGION_ID}
jobs:
- name: Blue/Green Deploy
type: deployer
target:
region_id: ${REGION_ID}
organization: ${ORG_NAME}
space: ${SPACE_NAME}
application: ${CF_APP_NAME}
script: |-
#!/bin/bash
# The branch may use a custom manifest
MANIFEST=manifest.yml
if [ -f ${REPO_BRANCH}-manifest.yml ]; then
MANIFEST=${REPO_BRANCH}-manifest.yml
fi
echo "Using manifest file: $MANIFEST"
# and a prefix for services if not building the master branch
if [ "$REPO_BRANCH" == "master" ]; then
echo "No prefix for master branch"
PREFIX=""
else
PREFIX=$REPO_BRANCH"-"
echo "Using prefix: $PREFIX"
fi
# Create CF services
cf create-service cloudantNoSQLDB Lite ${PREFIX}insurance-policy-db
# Set app's env vars
domain=".mybluemix.net"
case "${REGION_ID}" in
ibm:yp:eu-gb)
domain=".eu-gb.mybluemix.net"
;;
ibm:yp:au-syd)
domain=".au-syd.mybluemix.net"
;;
esac
if ! cf app $CF_APP; then
cf push $CF_APP -n $CF_APP -f $MANIFEST --no-start
cf set-env $CF_APP CATALOG_URL https://$CATALOG_APP_NAME$domain
cf start $CF_APP
else
OLD_CF_APP=${CF_APP}-OLD-$(date +"%s")
rollback() {
set +e
if cf app $OLD_CF_APP; then
cf logs $CF_APP --recent
cf delete $CF_APP -f
cf rename $OLD_CF_APP $CF_APP
fi
exit 1
}
set -e
trap rollback ERR
cf rename $CF_APP $OLD_CF_APP
cf push $CF_APP -n $CF_APP -f $MANIFEST --no-start
cf set-env $CF_APP CATALOG_URL https://$CATALOG_APP_NAME$domain
cf start $CF_APP
cf delete $OLD_CF_APP -f
fi
---
stages:
- name: BUILD
inputs:
- type: git
branch: ${REPO_BRANCH}
service: ${REPO}
triggers:
- type: commit
jobs:
- name: Build
type: builder
- name: DEPLOY
inputs:
- type: job
stage: BUILD
job: Build
triggers:
- type: stage
properties:
- name: REPO_BRANCH
value: ${REPO_BRANCH}
- name: CATALOG_APP_NAME
value: ${CATALOG_APP_NAME}
- name: REGION_ID
value: ${REGION_ID}
jobs:
- name: Blue/Green Deploy
type: deployer
target:
region_id: ${REGION_ID}
organization: ${ORG_NAME}
space: ${SPACE_NAME}
application: ${CF_APP_NAME}
script: |-
#!/bin/bash
# The branch may use a custom manifest
MANIFEST=manifest.yml
if [ -f ${REPO_BRANCH}-manifest.yml ]; then
MANIFEST=${REPO_BRANCH}-manifest.yml
fi
echo "Using manifest file: $MANIFEST"
# and a prefix for services if not building the master branch
if [ "$REPO_BRANCH" == "master" ]; then
echo "No prefix for master branch"
PREFIX=""
else
PREFIX=$REPO_BRANCH"-"
echo "Using prefix: $PREFIX"
fi
# Create CF services
cf create-service cloudantNoSQLDB Lite ${PREFIX}insurance-policy-db
# Set app's env vars
domain=".mybluemix.net"
case "${REGION_ID}" in
ibm:yp:eu-gb)
domain=".eu-gb.mybluemix.net"
;;
ibm:yp:au-syd)
domain=".au-syd.mybluemix.net"
;;
esac
if ! cf app $CF_APP; then
cf push $CF_APP -n $CF_APP -f $MANIFEST --no-start
cf set-env $CF_APP CATALOG_URL https://$CATALOG_APP_NAME$domain
cf start $CF_APP
else
OLD_CF_APP=${CF_APP}-OLD-$(date +"%s")
rollback() {
set +e
if cf app $OLD_CF_APP; then
cf logs $CF_APP --recent
cf delete $CF_APP -f
cf rename $OLD_CF_APP $CF_APP
fi
exit 1
}
set -e
trap rollback ERR
cf rename $CF_APP $OLD_CF_APP
cf push $CF_APP -n $CF_APP -f $MANIFEST --no-start
cf set-env $CF_APP CATALOG_URL https://$CATALOG_APP_NAME$domain
cf start $CF_APP
cf delete $OLD_CF_APP -f
fi
Loading

0 comments on commit 426bb56

Please sign in to comment.