forked from open-toolchain/simple-toolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
238 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Hello World Deploy Stage", | ||
"description": "hello-world simple toolchain", | ||
"longDescription": "The Delivery Pipeline for Devops Services allows you to automate your continuous deployment setup hello-world.", | ||
"type": "object", | ||
"properties": { | ||
"prod-region": { | ||
"description": "The bluemix region", | ||
"type": "string" | ||
}, | ||
"prod-organization": { | ||
"description": "The bluemix org", | ||
"type": "string" | ||
}, | ||
"prod-space": { | ||
"description": "The bluemix space", | ||
"type": "string" | ||
}, | ||
"hello-world-name": { | ||
"description": "hello world app name", | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["prod-region", "prod-organization", "prod-space", "hello-world-name"], | ||
"form": [ | ||
{ | ||
"type": "validator", | ||
"url": "/develop/setup/bm-helper/helper.html" | ||
}, | ||
{ | ||
"type": "text", | ||
"readonly": false, | ||
"title": "Hello World App Name", | ||
"key": "hello-world-name" | ||
}, | ||
{ | ||
"type": "table", | ||
"columnCount": 4, | ||
"widths": ["15%", "28%", "28%", "28%"], | ||
"items": [ | ||
{ | ||
"type": "label", | ||
"title": "" | ||
}, | ||
{ | ||
"type": "label", | ||
"title": "Region" | ||
}, | ||
{ | ||
"type": "label", | ||
"title": "Organization" | ||
}, | ||
{ | ||
"type": "label", | ||
"title": "Space" | ||
}, | ||
{ | ||
"type": "label", | ||
"title": "Prod Stage" | ||
}, | ||
{ | ||
"type": "select", | ||
"key": "prod-region" | ||
}, | ||
{ | ||
"type": "select", | ||
"key": "prod-organization" | ||
}, | ||
{ | ||
"type": "select", | ||
"key": "prod-space", | ||
"readonly": false | ||
} | ||
] | ||
} | ||
] | ||
} |
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,53 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Hello-world Deploy Stage", | ||
"description": "GitHub Schema hello-world", | ||
"longDescription": "The GitHub Service allows you to create or use an existing GitHub repository to store your source code.", | ||
"type": "object", | ||
"properties": { | ||
"hello-world-repo_name": { | ||
"type": "string" | ||
}, | ||
"hello-world-repo_url": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["hello-world-repo_name", "hello-world-repo_url"], | ||
"form": [ | ||
{ | ||
"type": "validator", | ||
"url": "/develop/setup/bm-helper/custom_github_helper.html" | ||
}, | ||
{ | ||
"type": "table", | ||
"columnCount": 3, | ||
"widths": ["47%", "6%", "47%"], | ||
"items": [ | ||
{ | ||
"type": "label", | ||
"title": "Source Repository" | ||
}, | ||
{ | ||
"type": "label", | ||
"title": "" | ||
}, | ||
{ | ||
"type": "label", | ||
"title": "Target Repository" | ||
}, | ||
{ | ||
"type": "text", | ||
"key": "hello-world-repo_url" | ||
}, | ||
{ | ||
"type": "icon", | ||
"iconType": "right_arrow" | ||
}, | ||
{ | ||
"type": "text", | ||
"key": "hello-world-repo_name" | ||
} | ||
] | ||
} | ||
] | ||
} |
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,42 @@ | ||
--- | ||
stages: | ||
- name: BUILD | ||
inputs: | ||
- type: git | ||
branch: master | ||
service: ${HELLO_WORLD_REPO} | ||
triggers: | ||
- type: commit | ||
jobs: | ||
- name: Build | ||
type: builder | ||
- name: DEPLOY | ||
inputs: | ||
- type: job | ||
stage: BUILD | ||
job: Build | ||
triggers: | ||
- type: stage | ||
properties: | ||
- name: CF_APP_NAME | ||
value: undefined | ||
type: text | ||
- name: APP_URL | ||
value: undefined | ||
type: text | ||
jobs: | ||
- name: Deploy | ||
type: deployer | ||
target: | ||
region_id: ${PROD_REGION_ID} | ||
organization: ${PROD_ORG_NAME} | ||
space: ${PROD_SPACE_NAME} | ||
application: ${CF_APP_NAME} | ||
script: | | ||
#!/bin/bash | ||
# Push app | ||
export CF_APP_NAME="$CF_APP" | ||
cf push "${CF_APP_NAME}" | ||
export APP_URL=http://$(cf app $CF_APP_NAME | grep urls: | awk '{print $2}') | ||
# View logs | ||
#cf logs "${CF_APP_NAME}" --recent |
Oops, something went wrong.