Feature #6248

Make Tails built iso name more unique

Added by bertagaz 2013-08-22 05:47:39 . Updated 2013-09-10 02:17:29 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Continuous Integration
Target version:
Start date:
2013-08-22
Due date:
% Done:

0%

Feature Branch:
feature/More_uniq_built_iso_name_in_jenkins
Type of work:
Code
Blueprint:

Starter:
0
Affected tool:
Deliverable for:

Description

We actually are keeping only one build per day on our nigthly archives, as the Tails iso name contains only the day of the build.

We could keep more builds per day as specified in the parent ticket by adding the hour and minute in the name of the built iso (%Y%m%d%H%M in place of %Y%m%d defined by AMNESIA_TODAY).

This shouldn’t break the different scripts using /etc/amnesia/version. At least perl’s DateTime::Format::ISO8601::parse_datetime used in tails-security-check seems to understand this format.


Subtasks


History

#1 Updated by bertagaz 2013-08-22 13:52:42

  • Status changed from New to Confirmed
  • Type of work changed from Code to Discuss

bertagaz wrote:
>
> This shouldn’t break the different scripts using /etc/amnesia/version. At least perl’s DateTime::Format::ISO8601::parse_datetime used in tails-security-check seems to understand this format.

After some tests, it appears that this new date format isn’t trully supported by perl. For this to work with tails-security-check, we would have to add more information to the date: %Y%m%dT%H%MZ

Alternatively we could just add the commit short ID, when building from a branch.

#2 Updated by intrigeri 2013-08-23 00:43:30

> For this to work with tails-security-check, we would have to add more
> information to the date: %Y%m%dT%H%MZ

> Alternatively we could just add the commit short ID, when building from a branch.

Both seem acceptable to me.

The commit ID will probably make it a bit easier to run the test suite
on autobuilt ISO images: it will avoid the need to go retrieve the
commit ID from inside the ISO.

Why not add both when the $JENKINS_URL environment variable is non-empty?

#3 Updated by bertagaz 2013-08-24 02:35:02

intrigeri wrote:
>
> The commit ID will probably make it a bit easier to run the test suite
> on autobuilt ISO images: it will avoid the need to go retrieve the
> commit ID from inside the ISO.
>
> Why not add both when the $JENKINS_URL environment variable is non-empty?

The resulting iso name will be quite long with both informations. I’m not sure adding the date in the name is really necessary for uniqueness if we use the short commit ID, as we can find this information (the date) by other means (through the filesystem for example). But I also don’t see a strong reason why not to add both informations, so let’s do that?

#4 Updated by intrigeri 2013-08-24 06:38:54

> The resulting iso name will be quite long with both informations. I’m not sure adding
> the date in the name is really necessary for uniqueness if we use the short commit
> ID, as we can find this information (the date) by other means (through the filesystem
> for example). But I also don’t see a strong reason why not to add both informations,
> so let’s do that?

I could be convinced both ways, I guess. Let’s put both and see if painful in practice.

#5 Updated by bertagaz 2013-08-24 08:24:37

  • Type of work changed from Discuss to Code

#6 Updated by bertagaz 2013-09-02 03:49:09

  • Status changed from Confirmed to Fix committed
  • QA Check set to Ready for QA
  • Feature Branch set to feature/More_uniq_built_iso_name_in_jenkins

I’ve finally managed to get a better iso name while not messing with /etc/amnesia/version, so tails-security-check doesn’t need to be adapted.

See 64f39f1 in the feature/More_uniq_built_iso_name_in_jenkins branch

#7 Updated by intrigeri 2013-09-03 00:08:56

  • Status changed from Fix committed to In Progress
  • Assignee changed from bertagaz to intrigeri

Great! Reassigning to me for review, and setting back to “In progress” (“Fix committed” is equivalent to the “pending” state we had in ikiwiki, that is it’s been merged and will be part of the next release).

#8 Updated by intrigeri 2013-09-03 11:04:18

  • Assignee changed from intrigeri to bertagaz
  • QA Check changed from Ready for QA to Dev Needed

Initial review sent to tails-dev.

#9 Updated by bertagaz 2013-09-03 11:59:33

  • Assignee changed from bertagaz to intrigeri
  • QA Check changed from Dev Needed to Ready for QA

Review fixes have been pushed in the same branch.

#10 Updated by intrigeri 2013-09-04 03:50:03

  • Assignee changed from intrigeri to bertagaz
  • QA Check changed from Ready for QA to Dev Needed

Seems to not work in our production environment, see tails-dev.

#11 Updated by bertagaz 2013-09-05 10:35:56

I suspect the bug is in the vagrant/provision/assets/build-tails script, in the as_root_do() function. Probably sudo is dropping the $JENKINS_URL environment variable. I’ll give it a try in the next days, to get it ready before the freeze.

#12 Updated by bertagaz 2013-09-06 09:14:05

  • Assignee changed from bertagaz to intrigeri
  • QA Check changed from Dev Needed to Ready for QA

As suspected, the build-tails script was droping $JENKINS_URL when using sudo.

Fix has been commited in the dedicated branch and merged into the experimental one (on both lizard’s and origin’s repo).

Build on jenkins resulted in a correct iso naming:

http://nightly.tails.boum.org/build_Tails_ISO_experimental/

Local build also named correctly the resulting iso.

#13 Updated by intrigeri 2013-09-06 11:31:48

  • Assignee changed from intrigeri to bertagaz
  • QA Check changed from Ready for QA to Dev Needed

See tails-dev for another (hopefully final) review.

#14 Updated by bertagaz 2013-09-06 12:27:11

  • Assignee changed from bertagaz to intrigeri
  • QA Check changed from Dev Needed to Ready for QA

Code reworked accordingly.

#15 Updated by intrigeri 2013-09-07 02:38:31

  • Status changed from In Progress to Fix committed
  • Assignee deleted (intrigeri)
  • QA Check changed from Ready for QA to Pass

Merged into stable, devel and feature/wheezy :)

#16 Updated by intrigeri 2013-09-10 02:17:31

  • Status changed from Fix committed to Resolved

Actually this is now live on our Jenkins build host, no need to wait for a release, so marking as resolved.