-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial ci/settings.yml is populated with example parameters (#27)
* initialize settings.yml for boshrelease; assume credhub * go template attempts to construct ci/settings.yml + display credhub commands * configure fly -t target using $fly_target * add initial_settings + credhub helper for cfpush * credhub helper for docker/base * assume boshrelease meta.bosh-lite targetting a bosh-lite * easier to change team before running commands
- Loading branch information
Showing
9 changed files
with
207 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
echo "Example commands for setting up credhub for your pipeline:" | ||
echo "team=$team" | ||
echo "credhub set -n /concourse/\$team/git-commit-email -t value -v \"\$(git config user.email)\"" | ||
echo "credhub set -n /concourse/\$team/git-commit-name -t value -v \"\$(git config user.name)\"" | ||
echo "credhub set -n /concourse/\$team/aws-access-key -t value -v \"\$(grep access_key_id config/private.yml | awk '{print \$2}')\"" | ||
echo "credhub set -n /concourse/\$team/aws-secret-key -t value -v \"\$(grep secret_access_key config/private.yml | awk '{print \$2}')\"" | ||
echo "credhub set -n /concourse/\$team/$name/slack-username -t value -v concourse" | ||
echo "credhub set -n /concourse/\$team/$name/slack-icon-url -t value -v https://cl.ly/2F421Y300u07/concourse-logo-blue-transparent.png" | ||
echo | ||
echo "credhub set -n /concourse/\$team/$name/slack-webhook -t value -v https://slack.com/skip-slack-for-now" | ||
echo "credhub set -n /concourse/\$team/github-access-token -t value -v \"\$(echo \$GITHUB_TOKEN)\"" | ||
echo "credhub set -n /concourse/\$team/github-private-key -t value -v \"\$(cat ~/.ssh/id_rsa)\"" |
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,40 @@ | ||
--- | ||
meta: | ||
name: $(grep final_name config/final.yml | awk '{print $2}') | ||
target: ${fly_target} | ||
url: ${fly_target_url} | ||
|
||
test-errand: ~ | ||
|
||
initial_version: 1.0.0 | ||
|
||
git: | ||
email: ((git-commit-email)) | ||
name: ((git-commit-name)) | ||
|
||
bosh-lite: | ||
target: ((bosh-lite-environment)) | ||
cacert: ((bosh-lite-ca-cert)) | ||
username: ((bosh-lite-client)) | ||
password: ((bosh-lite-client-secret)) | ||
|
||
aws: | ||
bucket: (( grab meta.pipeline )) | ||
region_name: us-east-1 | ||
access_key: ((aws-access-key)) | ||
secret_key: ((aws-secret-key)) | ||
|
||
github: | ||
owner: cloudfoundry-community | ||
repo: (( grab meta.pipeline )) | ||
branch: $(git branch --no-color | awk '{print $2}') | ||
private_key: ((github-private-key)) | ||
access_token: ((github-access-token)) | ||
|
||
slack: | ||
webhook: ((slack-webhook)) | ||
username: ((slack-username)) | ||
icon: ((slack-icon-url)) | ||
channel: (( concat meta.name "-boshrelease" )) | ||
blob_success: '(( concat "$BUILD_PIPELINE_NAME: New version of $BUILD_JOB_NAME was detected, and updated in master. <" meta.url "/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME| Cut a new release?>" ))' | ||
blob_failure: '(( concat "$BUILD_PIPELINE_NAME: :airplane_arriving: <" meta.url "/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME| Failed to update the blob for $BUILD_JOB_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,9 @@ | ||
echo "Example commands for setting up credhub for your pipeline:" | ||
echo | ||
echo "For GitHub:" | ||
echo "credhub set -n /concourse/$team/github-access-token -t value -v \"\$(echo \$GITHUB_TOKEN)\"" | ||
echo "credhub set -n /concourse/$team/github-private-key -t value -v \"\$(cat ~/.ssh/id_rsa)\"" | ||
echo | ||
echo "For Cloud Foundry ($(jq .Target -r ~/.cf/config.json)):" | ||
echo "credhub set -n /concourse/$team/cf-username -t value -v \"your-username\"" | ||
echo "credhub set -n /concourse/$team/cf-password -t value -v \"your-password\"" |
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,23 @@ | ||
--- | ||
meta: | ||
name: $(basename $PWD) | ||
target: ${fly_target} | ||
url: ${fly_target_url} | ||
|
||
github: | ||
owner: $(jq .OrganizationFields.Name -r ~/.cf/config.json) | ||
repo: $(basename $PWD) | ||
branch: $(git branch --no-color | awk '{print $2}') | ||
private_key: ((github-private-key)) | ||
access_token: ((github-access-token)) | ||
|
||
cf: | ||
api: $(jq .Target -r ~/.cf/config.json) | ||
skip_cert_check: false | ||
username: ((cf-username)) | ||
password: ((cf-password)) | ||
appname: $(basename $PWD) | ||
organization: $(jq .OrganizationFields.Name -r ~/.cf/config.json) | ||
spaces: | ||
staging: $(basename $PWD)-staging | ||
production: $(basename $PWD)-production |
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,15 @@ | ||
echo "Example commands for setting up credhub for your pipeline:" | ||
echo "credhub set -n /concourse/$team/git-commit-email -t value -v \"\$(git config user.email)\"" | ||
echo "credhub set -n /concourse/$team/git-commit-name -t value -v \"\$(git config user.name)\"" | ||
echo "credhub set -n /concourse/$team/slack-username -t value -v concourse" | ||
echo "credhub set -n /concourse/$team/slack-icon-url -t value -v https://cl.ly/2F421Y300u07/concourse-logo-blue-transparent.png" | ||
echo | ||
echo "credhub set -n /concourse/$team/$name/slack-webhook -t value -v https://slack.com/skip-slack-for-now" | ||
echo "credhub set -n /concourse/$team/aws-access-key -t value -v \"AWS_ACCESS_KEY\"" | ||
echo "credhub set -n /concourse/$team/aws-secret-key -t value -v \"AWS_SECRET_KEY\"" | ||
echo "credhub set -n /concourse/$team/github-access-token -t value -v \"\$(echo \$GITHUB_TOKEN)\"" | ||
echo "credhub set -n /concourse/$team/github-private-key -t value -v \"\$(cat ~/.ssh/id_rsa)\"" | ||
echo | ||
echo "credhub set -n /concourse/$team/dockerhub-username -t value -v \"\$(whoami)\"" | ||
echo "credhub set -n /concourse/$team/dockerhub-email -t value -v \"\$(git config user.email)\"" | ||
echo "credhub set -n /concourse/$team/dockerhub-password -t value -v \"PASSWORD" |
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,36 @@ | ||
--- | ||
meta: | ||
name: $(basename $PWD) | ||
target: ${fly_target} | ||
url: ${fly_target_url} | ||
|
||
initial_version: 1.0.0 | ||
|
||
git: | ||
email: ((git-commit-email)) | ||
name: ((git-commit-name)) | ||
|
||
dockerhub: | ||
username: ((dockerhub-username)) | ||
email: ((dockerhub-email)) | ||
password: ((dockerhub-password)) | ||
repository: (( concat meta.github.owner "/" meta.name )) | ||
|
||
aws: | ||
bucket: (( grab meta.pipeline )) | ||
region_name: us-east-1 | ||
access_key: ((aws-access-key)) | ||
secret_key: ((aws-secret-key)) | ||
|
||
github: | ||
owner: $(jq .OrganizationFields.Name -r ~/.cf/config.json) | ||
repo: $(basename $PWD) | ||
branch: $(git branch --no-color | awk '{print $2}') | ||
private_key: ((github-private-key)) | ||
access_token: ((github-access-token)) | ||
|
||
slack: | ||
webhook: ((slack-webhook)) | ||
username: ((slack-username)) | ||
icon: ((slack-icon-url)) | ||
channel: "#$(basename $PWD)" |
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,11 @@ | ||
echo "Example commands for setting up credhub for your pipeline:" | ||
echo "credhub set -n /concourse/$team/git-commit-email -t value -v \"\$(git config user.email)\"" | ||
echo "credhub set -n /concourse/$team/git-commit-name -t value -v \"\$(git config user.name)\"" | ||
echo "credhub set -n /concourse/$team/slack-username -t value -v concourse" | ||
echo "credhub set -n /concourse/$team/slack-icon-url -t value -v https://cl.ly/2F421Y300u07/concourse-logo-blue-transparent.png" | ||
echo | ||
echo "credhub set -n /concourse/$team/$name/slack-webhook -t value -v https://slack.com/skip-slack-for-now" | ||
echo "credhub set -n /concourse/$team/aws-access-key -t value -v \"AWS_ACCESS_KEY\"" | ||
echo "credhub set -n /concourse/$team/aws-secret-key -t value -v \"AWS_SECRET_KEY\"" | ||
echo "credhub set -n /concourse/$team/github-access-token -t value -v \"\$(echo \$GITHUB_TOKEN)\"" | ||
echo "credhub set -n /concourse/$team/github-private-key -t value -v \"\$(cat ~/.ssh/id_rsa)\"" |
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,35 @@ | ||
--- | ||
meta: | ||
name: $(basename $PWD) | ||
target: ${fly_target} | ||
url: ${fly_target_url} | ||
|
||
initial_version: 1.0.0 | ||
|
||
go: | ||
version: "1.9" | ||
binary: $(basename $PWD) | ||
cmd_module: . | ||
|
||
git: | ||
email: ((git-commit-email)) | ||
name: ((git-commit-name)) | ||
|
||
aws: | ||
bucket: (( grab meta.pipeline )) | ||
region_name: us-east-1 | ||
access_key: ((aws-access-key)) | ||
secret_key: ((aws-secret-key)) | ||
|
||
github: | ||
owner: $(basename $(dirname $PWD)) | ||
repo: $(basename $PWD) | ||
branch: $(git branch --no-color | awk '{print $2}') | ||
private_key: ((github-private-key)) | ||
access_token: ((github-access-token)) | ||
|
||
slack: | ||
webhook: ((slack-webhook)) | ||
username: ((slack-username)) | ||
icon: ((slack-icon-url)) | ||
channel: "#$(basename $PWD)" |
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