Continuous Delivery

Hi

We are using Octopus Deploy to assist in our continuous delivery process and would like it to use the following format for releases using the version template feature:

#{Octopus.Date.Year}.#{Octopus.Date.Month}.#{Octopus.Date.Day}.#{Uniqiue.ID}

Ideally this #{Uniqiue.ID} would be as simple as an incremental number starting at 1 every day but would settle for any #{Uniqiue.ID} for the day

Please can you let me know how to implement this ASAP?

We are demonstrating to our department at 3pm today so it would be really great to showcase this by this time if possible.

Cheers, Jason

Hi Jason

Thanks for getting in touch.

We don’t have an out of the box way to do this, it’s not something we’ve ever been asked for as far as I know.

Can you explain what the significance of a daily, resetting unique number is ? It doesn’t seem something that’s very traceable.

Kind regards

Damian

Hi Damian

Thanks for the prompt response.

The reason is that with Continuous delivery we are constantly building and releasing so need to track indevidual builds as they are released, for rollback, etc.

I tried using the following…

#{Octopus.Date.Year}.#{Octopus.Date.Month}.#{Octopus.Date.Day}.#{Octopus.Version.NextPatch}

…however this bizarrely jumped from version XXXX.1 to XXXX.28!!

Cheers, Jason

Hi Jason

We increment with a major.minor.patch convention. So if you had a 2015.2.27 as your first build, the next patch will be 28.

Try #{Octopus.Date.Year}.#{Octopus.Date.Month}.#{Octopus.Date.Day}.i

it won’t look right until the release is created but it will increment after that.

Sorry, this isn’ty creating any releases, even after multiple attempts.

Can you show me / tell me what it’s doing when it’s not creating a release ?

What do you currently have as the versioning template ?

As an aside, a lot of people use the build to version a release, what does your build process look like ? can you use that or is it too early in your trial ?

Damian

Hi Damian

I am using the following batch file triggered by the TFS build server on success of test in the build template…

echo off
cd %~dp0
octo create-release --project=XXXX --deployto=DEV --server=XXXXXXXXX --apiKey=XXXXXXXX --v:CustomInstallationDirectory=E:\web\XXXXXXXX > C:\Temp\deploylog.txt 2>&1

The template is set to #{Octopus.Date.Year}.#{Octopus.Date.Month}.#{Octopus.Date.Day}.i

I cleared down any previous releases and nugget packages beforehand , and all was working until I updated the template as suggested.

Cheers, Jason

Hi Damian

I am using the following batch file triggered by the TFS build server on success of test in the build template…

echo off
cd %~dp0
octo create-release --project=XXXX --deployto=DEV --server=XXXXXXXXX --apiKey=XXXXXXXX --v:CustomInstallationDirectory=E:\web\XXXXXXXX > C:\Temp\deploylog.txt 2>&1

The template is set to #{Octopus.Date.Year}.#{Octopus.Date.Month}.#{Octopus.Date.Day}.i

I cleared down any previous releases and nugget packages beforehand , and all was working until I updated the template as suggested.

Cheers, Jason

If you create a release manually does it work ?

No I get the following…

There was a problem with your request.

You specified a version mask of ‘2015.02.27.i’, but there was no existing release to start from. Please create a release using a specific version number first.

Hi Jason,

If you create one release say 2015.02.27.0 (manually) then the ‘i’ value has something to build from, even if you delete it after your second release is created.

Vanessa

Scrap that I see what you mean; I manually created a 2015.02.27.1 release and begun my continuous delivery and all seems fine.; 2015.02.27.2, 2015.02.27.3…

Is there a way to fix the problem of having to manually create the first release?

Cheers, Jason

Hi Jason

Try this instead: #{Octopus.Date.Year}.#{Octopus.Date.Month}.#{Octopus.Date.Day}.#{Octopus.Version.NextBuild}

Vanessa

I tried this first and it jumped from XXXX.1 to XXXX.28?!!

Hi Jason,

It seems NextPatch and NextBuild all reference the 3rd number but NextRevision is working for me as the 4th.

Vanessa