Skip to content
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

Allow specifying target version #12

Merged
merged 4 commits into from
Oct 24, 2017

Conversation

arvindsv
Copy link
Contributor

@arvindsv arvindsv commented Oct 23, 2017

Does this:

  1. Updates README: Mostly Go => GoCD and *.go.cd to *.gocd.org.
  2. Accept multiple patterns in the settings file. Old (single) patterns work too.
  3. Allow specifying target version in the JSON. The field I chose is "version".

It'll be like this:

{
  "format_version": 2,
  "name": "pipeline1",
  ...
}
{
  "format_version": 2,
  "name": "environment1",
  ...
}

I can change "version" to something else, if you prefer. "json_version"? "file_version"? I don't want people to confuse it with some kind of a version for the pipeline/environment.

Edit: Based on @tomzo's comment below, this has been changed to format_version.

* Mostly Go => GoCD
* Update *.go.cd to *.gocd.org
@tomzo
Copy link
Owner

tomzo commented Oct 24, 2017

I can change "version" to something else, if you prefer. "json_version"? "file_version"? I don't want people to confuse it with some kind of a version for the pipeline/environment.

I think format_version would be clearer. Same in yaml.

* All pipeline and environment JSONs should have the same version in a repo.
* Missing versions are assumed to be the same as the default version, ie, 1.
@arvindsv arvindsv force-pushed the allow-specifying-target-version branch from 719490c to ab412f8 Compare October 24, 2017 15:32
@arvindsv arvindsv force-pushed the allow-specifying-target-version branch from ab412f8 to 74cdbba Compare October 24, 2017 15:38
@arvindsv arvindsv changed the title Work in progress: Allow specifying target version Allow specifying target version Oct 24, 2017
@arvindsv
Copy link
Contributor Author

@tomzo This is done. Changed it to format_version. Tested it too - and it looks ok. Even the multiple pattern part. I'll do something similar for yaml too.

@arvindsv
Copy link
Contributor Author

Errors show like this:

2017_10_24_11-16-54

2017_10_24_09-45-48

Not pretty, but descriptive.

@arvindsv
Copy link
Contributor Author

I haven't changed the README to explain the concept of format_version and that you need to use lock_behavior instead of enable_pipeline_locking. I'll leave that to you, if that's ok.

@tomzo
Copy link
Owner

tomzo commented Oct 24, 2017

OK, I'll merge this and update the readme. I presume lock_behavior will be since 17.11

@arvindsv
Copy link
Contributor Author

It will be in 17.12 (November), actually. Won't make it to 17.11 (this week). So, it's not urgent, but this change should be alright to merge at any time.

@tomzo tomzo merged commit 74cdbba into tomzo:master Oct 24, 2017
@tomzo
Copy link
Owner

tomzo commented Oct 24, 2017

I have merged this and released with 0.2.1. When you are done with yaml, I will make a release there too. Then I will submit PR for bumping bundled versions.

@arvindsv
Copy link
Contributor Author

Just for the record, the corresponding PR in the GoCD codebase is gocd/gocd#3943.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants