- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Fetch Spring Cloud Config Server's latest release #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…e broker config to test out the changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR doesn't address need to bump the config_server_release version (via a git commit). Only changes state locally during the 'deploy-testflight' task.
Needs re-thinking
| basic_plan_id: basic | ||
| description: Broker to create config-servers | ||
| long_description: Broker to create config-servers | ||
| config_server_release_tag: v3.1.0 | 
There was a problem hiding this comment.
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
| 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 | 
There was a problem hiding this comment.
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
| branch: update-release-tag | ||
| private_key: (( param "Please generate an SSH Deployment Key for this repo and specify it here" )) | ||
|  | ||
| spring-github: | 
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
| private_key: (( param "Please generate an SSH Deployment Key for this repo and specify it here" )) | ||
|  | ||
| spring-github: | ||
| uri: (( concat "[email protected]:" meta.github.owner "/" meta.github.repo )) | 
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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)
| 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: ci | 
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
| user: (( grab meta.github.owner )) | ||
| repository: (( grab meta.github.repo )) | ||
| access_token: (( grab meta.github.access_token )) | ||
| - name: fetch-spring-latest-rel | 
There was a problem hiding this comment.
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
|  | ||
| 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 | 
There was a problem hiding this comment.
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
|  | ||
| 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 | 
There was a problem hiding this comment.
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
8f5a61d    to
    724fd34      
    Compare
  
    | @bodymindarts In the past few days, I have tried configuring separate job to bump up  | 
| There's another method to pull it off, but in the  | 
| Have you tried using sed? Dennis and I spoke about it a while ago (he mentioned he had helped you) and we agreed there must be a commit either before or after TestFlight. Wether or not you do it before or after is a fair disagreement. Either way has its merit - I still prefer before but wouldn't argue with someone that thinks after is better. Either way the state that you test must be persisted in the repo at some point. FYI if you do the  UPDATE: using the  | 
| Naveed, Are you ready for a review? If so, please request a review again. | 
The following work was done as a part of this PR:
github-release-resourcewas implemented to pull the latest release tag from Spring cloud config server's repo. This by default pulls down the assets from the latest release.v3.0.0to test the functionality of the implemented logic. Would be taken out before the merge.ci/scripts/deploy-testflightscript was modified to update the release tag for the config server broker. The logic implemented was to grab the version fromtagfile that thegithub-resource-releasecreates. This version was in turn used to update theconfig_server_release_tagin the CF broker config. The last part was implemented using[yq](https://github.com/mikefarah/yq/)which is a useful command line YAML processor..jarthat thegithub-release-resourcefetches by default along with the other assets. There are options to ignore the source tarball and source zip files though. Have to look into this.