How to set cc.info with cf-release spiff templates ?


Guillaume Berche
 

Hi,

I'm trying to assign cc.info.description and cc.info.version [1] (to merge
meta.releases[0].version if cf release version), as to be able to describe
to end users which cf version is currently deployed from a "cf curl
v2/info" command.

I'm however struggling with spiff syntax to do so. I trial-and-errored
around modifying cf-release/templates as to allow for the merge without
luck so far.

Anyone succeeded in doing so without forking standard spiff templates ?

Thanks in advance,

Guillaume.

[1]
https://github.com/cloudfoundry/cf-release/blob/9334295133435fa77767651030500d2b0de62611/jobs/cloud_controller_ng/spec#L140-L145


CF Runtime
 

Unfortunately those properties don't actually do what they say. A story has
been added to the CAPI backlog to clean those up, and possibly change them:
https://www.pivotaltracker.com/story/show/102523218

In the meantime, you can override `version` and `description`, they are
currently used to populate the info endpoint, but they may change in the
process of doing the above story.

After the story is done, we'll add the attributes to the template so they
are easy to override, but for now you'll need to manually edit your
manifest to add the `version` and `description` properties.

Joseph
OSS Release Integration Team

On Thu, Aug 27, 2015 at 1:07 PM, Guillaume Berche <bercheg(a)gmail.com> wrote:

Hi,

I'm trying to assign cc.info.description and cc.info.version [1] (to merge
meta.releases[0].version if cf release version), as to be able to describe
to end users which cf version is currently deployed from a "cf curl
v2/info" command.

I'm however struggling with spiff syntax to do so. I trial-and-errored
around modifying cf-release/templates as to allow for the merge without
luck so far.

Anyone succeeded in doing so without forking standard spiff templates ?

Thanks in advance,

Guillaume.

[1]
https://github.com/cloudfoundry/cf-release/blob/9334295133435fa77767651030500d2b0de62611/jobs/cloud_controller_ng/spec#L140-L145


Guillaume Berche
 

Thanks Joseph for your response. Any chance that the OSS build pipeline
would update the spiff template with the current version number of the cf
release being built, as to avoid each consummers of the release to manually
update version number when updating cc.info.version ? Ideally by having the
spiff templates override the default value (yet-to-be-specified in the
release's spec file, see [3]) by the current cf release number ?

I was trying to manually assign this value with meta.releases[0].version,
but I see that meta.releases[0].version seems to always specify 'latest'
[2]. One possibility would have to specify the current release number (e.g.
'215')

Thanks in advance,

Guillaume.

[2]
https://github.com/cloudfoundry/cf-release/blob/90d730a2d13d9e065a7f348e7fd31a1522074d02/templates/cf-deployment.yml#L10
[3] https://github.com/cloudfoundry/cf-release/issues/774

On Tue, Sep 1, 2015 at 11:29 PM, CF Runtime <cfruntime(a)gmail.com> wrote:

Unfortunately those properties don't actually do what they say. A story
has been added to the CAPI backlog to clean those up, and possibly change
them: https://www.pivotaltracker.com/story/show/102523218

In the meantime, you can override `version` and `description`, they are
currently used to populate the info endpoint, but they may change in the
process of doing the above story.

After the story is done, we'll add the attributes to the template so they
are easy to override, but for now you'll need to manually edit your
manifest to add the `version` and `description` properties.

Joseph
OSS Release Integration Team

On Thu, Aug 27, 2015 at 1:07 PM, Guillaume Berche <bercheg(a)gmail.com>
wrote:

Hi,

I'm trying to assign cc.info.description and cc.info.version [1] (to
merge meta.releases[0].version if cf release version), as to be able to
describe to end users which cf version is currently deployed from a "cf
curl v2/info" command.

I'm however struggling with spiff syntax to do so. I trial-and-errored
around modifying cf-release/templates as to allow for the merge without
luck so far.

Anyone succeeded in doing so without forking standard spiff templates ?

Thanks in advance,

Guillaume.

[1]
https://github.com/cloudfoundry/cf-release/blob/9334295133435fa77767651030500d2b0de62611/jobs/cloud_controller_ng/spec#L140-L145