Skip to content
2 changes: 1 addition & 1 deletion cf/broker_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ basic_plan_name: basic
basic_plan_id: basic
description: Broker to create config-servers
long_description: Broker to create config-servers
config_server_release_tag: v3.1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version shouldn't change when merging into master ... perhaps upward if at all

config_server_release_tag: v3.0.0
cloud_foundry_config:
api_url: (( param "Please override cloud_foundry_config.api_url in inputs.yml" ))
skip_ssl_validation: true
Expand Down
18 changes: 17 additions & 1 deletion ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ meta:
uri: (( concat "[email protected]:" meta.github.owner "/" meta.github.repo ))
owner: (( param "Please specify the name of the user / organization that owns the Github repository" ))
repo: (( param "Please specify the name of the Github repository" ))
branch: master
branch: update-release-tag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

branch shouldn't change when merging into master

private_key: (( param "Please generate an SSH Deployment Key for this repo and specify it here" ))

spring-github:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we find a better name? spring is non descriptive.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps:

cloud-config-server:
  github:
    owner:

uri: (( concat "[email protected]:" meta.github.owner "/" meta.github.repo ))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't meta.github.repo refer to this repo? (not the java repo)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be meta.spring-github.owner (or something else once you've changed the name)

owner: (( param "Please specify the name of the user / organization that owns the Github repository" ))
repo: (( param "Please specify the name of the Github repository" ))
branch: ci
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably be set in settings.yml NOT here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also oauth is the canonical branch we are currently working off of.

private_key: (( param "Please generate an SSH Deployment Key for this repo and specify it here" ))

go:
Expand Down Expand Up @@ -75,6 +82,7 @@ jobs:
- in_parallel:
- { get: git, trigger: true }
- { get: pipeline-tasks }
- { get: fetch-spring-latest-rel, trigger: true }
- task: test
config:
platform: linux
Expand Down Expand Up @@ -107,6 +115,7 @@ jobs:
- in_parallel:
- { get: pipeline-tasks }
- { get: git, trigger: true, passed: [test] }
- { get: fetch-spring-latest-rel }
- task: teardown-testflight
config:
platform: linux
Expand Down Expand Up @@ -136,6 +145,7 @@ jobs:
repository: (( grab meta.image.name ))
tag: (( grab meta.image.tag ))
inputs:
- name: fetch-spring-latest-rel
- name: pipeline-tasks
- name: git
run:
Expand Down Expand Up @@ -405,3 +415,9 @@ resources:
user: (( grab meta.github.owner ))
repository: (( grab meta.github.repo ))
access_token: (( grab meta.github.access_token ))
- name: fetch-spring-latest-rel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verb fetch shouldn't be part of resource name. verb is specified in concourse schema eg: {get: <resource-name>}

spring is non-descriptive better to use a name that is more indicative of what we are dealing with.
EG: cloud-config-server-release

type: github-release
source:
user: (( grab meta.spring-github.owner ))
repository: (( grab meta.spring-github.repo ))
access_token: (( grab meta.spring-github.access_token ))
11 changes: 11 additions & 0 deletions ci/scripts/deploy-testflight
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ echo "deploy-testflight"

cf login -a ${CF_API_URL} --skip-ssl-validation -u ${CF_USERNAME} -p ${CF_PASSWORD} -o ${CF_ORG} -s ${CF_SPACE}

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

installing deps belongs in the definition of the image we are using to execute the jobs. PR: https://github.com/starkandwayne/dockerfiles/tree/master/concourse/latest

apt-get install software-properties-common -y
apt-get update -y
add-apt-repository ppa:rmescandon/yq -y
apt update -y
apt install yq -y

latest_release_tag=$(cat fetch-spring-latest-rel/tag)
echo $latest_release_tag
yq w git/cf/broker_config.yml config_server_release_tag $latest_release_tag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we do this:

spruce json <file> | jq


pushd git

app_name=testflight-config-server-broker
Expand Down
9 changes: 8 additions & 1 deletion ci/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ meta:
github:
owner: starkandwayne
repo: config-server-broker
branch: master
branch: update-release-tag
private_key: ((github.private-key))
access_token: ((github.access-token))

spring-github:
owner: starkandwayne
repo: spring-cloud-config-server
branch: ci
private_key: ((github.private-key))
access_token: ((github.access-token))

Expand Down