You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Bruce Edge <br...@nextissuemedia.com> on 2015/03/27 22:28:15 UTC

build version numbering in sling jenkins build and debian package version number

I'd like to make the debian package that's built by jenkins have a unique version number that reflects the jenkins build number or some other meaningful version string.
Currently it's stuck at "8-SNAPSHOT" because this started off being tied to the launchpad build. It's not even related to launchpad any more, so I'd like to fix this versioning issue now.

( Side note question, should it be moved out from under contrib/launchpad/debian to contrib/debian as it's not related to launchpad anymore? )

What is the current mechanism used by the jenkins build to inject version numbers into pom files to obtain meaningful versions for the output artifacts?

I've always mvn -DBUILD_NUMBER=${BUILD_NUMBER} clean versions:set to set newVersion in the pom, but I don't see this used anywhere in the sling source tree.

Lastly, once the .deb package is built with an appropriate version number, would it be possible to get this pushed to nexus as part of a release so that it's available as a downloadable artifact?
Nexus does support exposing debian packages as artifacts via the deb plugin, so my question is, could this be done, rather than "is it possible".

thanks

-Bruce

Re: build version numbering in sling jenkins build and debian package version number

Posted by Bruce Edge <br...@nextissuemedia.com>.
>>>I just checked on the apache snapshots repo [1] and it's still not
>>>visible as an artifact, so I'm guessing that nexus is not configured to
>>>recognize .deb as a manageable artifact extension as this requires an
>>>additional nexus plugin [2].

>>You could post a ticket on the ASF infra jira -
>>https://issues.apache.org/jira/browse/INFRA
>>
>>Robert
>
>Posted INFRA-9419 [1]

The response was that the preferred binary distribution mechanism for
apache packages is bintray.com/apache.
Does someone with access to the apache bintray account need to create the
apache/sling repository ? [2]

[1] https://issues.apache.org/jira/browse/INFRA-9419

[2] https://bintray.com/apache/repositories


-Bruce


Re: build version numbering in sling jenkins build and debian package version number

Posted by Bruce Edge <br...@nextissuemedia.com>.
>>
>>I just checked on the apache snapshots repo [1] and it's still not
>>visible as an artifact, so I'm guessing that nexus is not configured to
>>recognize .deb as a manageable artifact extension as this requires an
>>additional nexus plugin [2].
>>
>>I've emailed infrastructure@apache.org requesting this. Please advise if
>>there is a better contact email for this request.
>
>You could post a ticket on the ASF infra jira -
>https://issues.apache.org/jira/browse/INFRA
>
>Robert


Posted INFRA-9419 [1]

[1] https://issues.apache.org/jira/browse/INFRA-9419

-Bruce

>
>>
>>Although, I did just notice that the current release on nexus is from
>>before this change went into the codebase, so it may be that it'll just
>>show up on the next release.
>>
>>[1] 
>>https://repository.apache.org/content/repositories/snapshots/org/apache/s
>>ling/sling-server/8-SNAPSHOT/
>>[2] https://github.com/inventage/nexus-apt-plugin
>>
>>-Bruce
>>
>
>
>
>-- 
>Sent from my (old) computer
>
>
>


Re: build version numbering in sling jenkins build and debian package version number

Posted by Robert Munteanu <ro...@lmn.ro>.
On Mon, Apr 6, 2015 at 6:52 PM, Bruce Edge
<br...@nextissuemedia.com> wrote:
>
>
> From: Robert Munteanu <ro...@apache.org>>
> Reply-To: "dev@sling.apache.org<ma...@sling.apache.org>" <de...@sling.apache.org>>
> Date: Monday, April 6, 2015 at 4:12 AM
> To: "dev@sling.apache.org<ma...@sling.apache.org>" <de...@sling.apache.org>>
> Subject: Re: build version numbering in sling jenkins build and debian package version number
>
> Hi Bruce,
>
> On Fri, 2015-03-27 at 21:28 +0000, Bruce Edge wrote:
> I'd like to make the debian package that's built by jenkins have a unique version number that reflects the jenkins build number or some other meaningful version string.
> Currently it's stuck at "8-SNAPSHOT" because this started off being tied to the launchpad build. It's not even related to launchpad any more, so I'd like to fix this versioning issue now.
> ( Side note question, should it be moved out from under contrib/launchpad/debian to contrib/debian as it's not related to launchpad anymore? )
> What is the current mechanism used by the jenkins build to inject version numbers into pom files to obtain meaningful versions for the output artifacts?
> I've always mvn -DBUILD_NUMBER=${BUILD_NUMBER} clean versions:set to set newVersion in the pom, but I don't see this used anywhere in the sling source tree.
>
> We probably don't use this since BUILD_NUMBER does not exist outside of
> Jenkins.
>
> Lastly, once the .deb package is built with an appropriate version number, would it be possible to get this pushed to nexus as part of a release so that it's available as a downloadable artifact?
> Nexus does support exposing debian packages as artifacts via the deb plugin, so my question is, could this be done, rather than "is it possible".
>
> That's a question for infra I guess ( see [1] )
>
> Robert
>
> [1]: https://www.apache.org/dev/infra-contact
>
>
> This issue has moved on to the next hurdle now.
>
> WRT the version numbering, Tomasz figured out that we could use the maven jdeb plugin to extract a build number from the environment regardless of context.
> It's currently configured to use:
>                         <configuration>
>                             <snapshotExpand>true</snapshotExpand>
>                             <snapshotEnv>BUILD_NUMBER</snapshotEnv>
>
> this uses the jenkins BUILD_NUMBER, if present, otherwise it expands to the SNAPSHOT equivalent, so it works for jenkins and local builds alike.
>
> I just checked on the apache snapshots repo [1] and it's still not visible as an artifact, so I'm guessing that nexus is not configured to recognize .deb as a manageable artifact extension as this requires an additional nexus plugin [2].
>
> I've emailed infrastructure@apache.org requesting this. Please advise if there is a better contact email for this request.

You could post a ticket on the ASF infra jira -
https://issues.apache.org/jira/browse/INFRA

Robert

>
> Although, I did just notice that the current release on nexus is from before this change went into the codebase, so it may be that it'll just show up on the next release.
>
> [1] https://repository.apache.org/content/repositories/snapshots/org/apache/sling/sling-server/8-SNAPSHOT/
> [2] https://github.com/inventage/nexus-apt-plugin
>
> -Bruce
>



-- 
Sent from my (old) computer

Re: build version numbering in sling jenkins build and debian package version number

Posted by Bruce Edge <br...@nextissuemedia.com>.

From: Robert Munteanu <ro...@apache.org>>
Reply-To: "dev@sling.apache.org<ma...@sling.apache.org>" <de...@sling.apache.org>>
Date: Monday, April 6, 2015 at 4:12 AM
To: "dev@sling.apache.org<ma...@sling.apache.org>" <de...@sling.apache.org>>
Subject: Re: build version numbering in sling jenkins build and debian package version number

Hi Bruce,

On Fri, 2015-03-27 at 21:28 +0000, Bruce Edge wrote:
I'd like to make the debian package that's built by jenkins have a unique version number that reflects the jenkins build number or some other meaningful version string.
Currently it's stuck at "8-SNAPSHOT" because this started off being tied to the launchpad build. It's not even related to launchpad any more, so I'd like to fix this versioning issue now.
( Side note question, should it be moved out from under contrib/launchpad/debian to contrib/debian as it's not related to launchpad anymore? )
What is the current mechanism used by the jenkins build to inject version numbers into pom files to obtain meaningful versions for the output artifacts?
I've always mvn -DBUILD_NUMBER=${BUILD_NUMBER} clean versions:set to set newVersion in the pom, but I don't see this used anywhere in the sling source tree.

We probably don't use this since BUILD_NUMBER does not exist outside of
Jenkins.

Lastly, once the .deb package is built with an appropriate version number, would it be possible to get this pushed to nexus as part of a release so that it's available as a downloadable artifact?
Nexus does support exposing debian packages as artifacts via the deb plugin, so my question is, could this be done, rather than "is it possible".

That's a question for infra I guess ( see [1] )

Robert

[1]: https://www.apache.org/dev/infra-contact


This issue has moved on to the next hurdle now.

WRT the version numbering, Tomasz figured out that we could use the maven jdeb plugin to extract a build number from the environment regardless of context.
It's currently configured to use:
                        <configuration>
                            <snapshotExpand>true</snapshotExpand>
                            <snapshotEnv>BUILD_NUMBER</snapshotEnv>

this uses the jenkins BUILD_NUMBER, if present, otherwise it expands to the SNAPSHOT equivalent, so it works for jenkins and local builds alike.

I just checked on the apache snapshots repo [1] and it's still not visible as an artifact, so I'm guessing that nexus is not configured to recognize .deb as a manageable artifact extension as this requires an additional nexus plugin [2].

I've emailed infrastructure@apache.org requesting this. Please advise if there is a better contact email for this request.

Although, I did just notice that the current release on nexus is from before this change went into the codebase, so it may be that it'll just show up on the next release.

[1] https://repository.apache.org/content/repositories/snapshots/org/apache/sling/sling-server/8-SNAPSHOT/
[2] https://github.com/inventage/nexus-apt-plugin

-Bruce


Re: build version numbering in sling jenkins build and debian package version number

Posted by Robert Munteanu <ro...@apache.org>.
Hi Bruce,

On Fri, 2015-03-27 at 21:28 +0000, Bruce Edge wrote:
> I'd like to make the debian package that's built by jenkins have a unique version number that reflects the jenkins build number or some other meaningful version string.
> Currently it's stuck at "8-SNAPSHOT" because this started off being tied to the launchpad build. It's not even related to launchpad any more, so I'd like to fix this versioning issue now.
> 
> ( Side note question, should it be moved out from under contrib/launchpad/debian to contrib/debian as it's not related to launchpad anymore? )
> 
> What is the current mechanism used by the jenkins build to inject version numbers into pom files to obtain meaningful versions for the output artifacts?
> 
> I've always mvn -DBUILD_NUMBER=${BUILD_NUMBER} clean versions:set to set newVersion in the pom, but I don't see this used anywhere in the sling source tree.

We probably don't use this since BUILD_NUMBER does not exist outside of
Jenkins.

> 
> Lastly, once the .deb package is built with an appropriate version number, would it be possible to get this pushed to nexus as part of a release so that it's available as a downloadable artifact?
> Nexus does support exposing debian packages as artifacts via the deb plugin, so my question is, could this be done, rather than "is it possible".

That's a question for infra I guess ( see [1] )

Robert

[1]: https://www.apache.org/dev/infra-contact