Opening up snapshot deployment

28 views
Skip to first unread message

Daniel Beck

unread,
Dec 20, 2016, 10:21:13 AM12/20/16
to Jenkins Developers
Hi everyone,

Right now, snapshot deployment is limited to the users with permission to publish proper releases of the same component. This restriction exists to prevent unauthorized and possibly malicious releases of a component to users.

That reason does not apply to snapshots -- they are not distributed to users via the update site. Even the 'experimental' update site only distributes releases with a special version number. Therefore I intend to relax the rules on the snapshots repository, so that anyone with an account will be able to publish snapshots of plugins to e.g. facilitate changes spanning multiple plugins.

WDYT?

Daniel

Baptiste Mathus

unread,
Dec 20, 2016, 12:51:34 PM12/20/16
to Jenkins Developers
+1. Can't think of a glaring hole with this change. 



--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/B826C165-20DE-4182-9EAA-E7594CA5436E%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.

Scott Hebert

unread,
Dec 20, 2016, 8:34:17 PM12/20/16
to jenkinsci-dev
+1

Daniel Beck

unread,
Dec 21, 2016, 11:08:39 AM12/21/16
to jenkin...@googlegroups.com

> On 20.12.2016, at 16:21, Daniel Beck <m...@beckweb.net> wrote:
>
> Therefore I intend to relax the rules on the snapshots repository, so that anyone with an account will be able to publish snapshots of plugins to e.g. facilitate changes spanning multiple plugins.

This has now been implemented.

(If you think you have discovered a security issue with opening up snapshot deployment like this, please file an issue in the SECURITY Jira project.)


Mark Waite

unread,
Jan 28, 2017, 1:56:29 PM1/28/17
to Jenkins Developers, m...@beckweb.net


On Wednesday, December 21, 2016 at 9:08:39 AM UTC-7, Daniel Beck wrote:

> On 20.12.2016, at 16:21, Daniel Beck <m...@beckweb.net> wrote:
>
> Therefore I intend to relax the rules on the snapshots repository, so that anyone with an account will be able to publish snapshots of plugins to e.g. facilitate changes spanning multiple plugins.

This has now been implemented.


I'm struggling with this.  I used "mvn deploy" to deploy a 2.3.0-SNAPSHOT version of the git client plugin so that I could use it to compile matching changes for the git plugin.  I see that the files were added to artifactory (see https://repo.jenkins-ci.org/webapp/#/artifacts/browse//search/quick/eyJzZWFyY2giOiJxdWljayIsInF1ZXJ5IjoiKmdpdC1jbGllbnQqMi4zKiIsInNlbGVjdGVkUmVwb3NpdG9yaWVzIjpbXX0=) but when I try to download them from the web UI (or from my git plugin build), they fail to download.

I can't download them when I'm anonymous, or when I'm logged in.

Any suggestions of what I'm doing wrong with SNAPSHOT deployment to artifactory?

Thanks,
Mark Waite

Daniel Beck

unread,
Jan 28, 2017, 3:07:38 PM1/28/17
to Jenkins Developers, Mark Waite

> On 28.01.2017, at 19:56, Mark Waite <mark.ea...@gmail.com> wrote:
>
> when I try to download them from the web UI (or from my git plugin build), they fail to download.

I get that the UI fails, as the reverse proxy config is broken (see the extra 'jenkinsci' as web app context on download links on the UI) but that shouldn't matter for Maven (and changing the URL around results in successful download.

Could you share a build log with the error?

Baptiste Mathus

unread,
Jan 28, 2017, 3:15:18 PM1/28/17
to Jenkins Developers, Mark Waite
Do you really want to go through the Artifactory UI? I don't even remember even opening it.


I also tried on ath and it worked indeed. Great Daniel!

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.

Mark Waite

unread,
Jan 28, 2017, 3:16:32 PM1/28/17
to Daniel Beck, Jenkins Developers
Log is appended to the end of the message.

I'm building from https://github.com/MarkEWaite/git-plugin using branch master-PR463-add-git-lfs.  It includes a dependency on git-client-plugin 2.3.0-SNAPSHOT which is built from https://github.com/MarkEWaite/git-client-plugin using branch master-PR232-support-lfs.

I was able to work around the problem by a checkout and build of the git-client-plugin as part of the build of the git-plugin.  That works, but seems more complicated than relying on a snapshot dependency during development and testing.

Mark Waite

Branch indexing
 > git rev-parse --is-inside-work-tree # timeout=11
Setting origin to https://github.com/MarkEWaite/git-plugin.git
 > git config remote.origin.url https://github.com/MarkEWaite/git-plugin.git # timeout=11
Fetching origin...
Fetching upstream changes from origin
 > git --version # timeout=11
 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/2.6.x
Seen branch in repository origin/3.0.0-PR439-add-ATH-subset-to-Jenkinsfile
Seen branch in repository origin/master
Seen branch in repository origin/master-PR439-add-ATH-subset-to-Jenkinsfile
Seen branch in repository origin/master-PR463-add-git-lfs
Seen branch in repository origin/master-PRxxx-move-findbugs-suppressions-into-code
Seen branch in repository origin/master-findbugs-combined
Seen branch in repository origin/master-findbugs-fixes
Seen branch in repository origin/ongoing/latest-jenkins-lts
Seen branch in repository origin/ongoing/lts
Seen 10 remote branches
Cloning the remote Git repository
Cloning repository https://github.com/MarkEWaite/git-plugin.git
 > git init /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA@script # timeout=11
Fetching upstream changes from https://github.com/MarkEWaite/git-plugin.git
 > git --version # timeout=11
 > git fetch --tags --progress https://github.com/MarkEWaite/git-plugin.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url https://github.com/MarkEWaite/git-plugin.git # timeout=11
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=11
 > git config remote.origin.url https://github.com/MarkEWaite/git-plugin.git # timeout=11
Fetching upstream changes from https://github.com/MarkEWaite/git-plugin.git
 > git fetch --tags --progress https://github.com/MarkEWaite/git-plugin.git +refs/heads/*:refs/remotes/origin/*
Checking out Revision 32cba0ffdeb475774c8208dfb49a971c2625eb56 (master-PR463-add-git-lfs)
 > git config core.sparsecheckout # timeout=11
 > git checkout -f 32cba0ffdeb475774c8208dfb49a971c2625eb56
First time build. Skipping changelog.
[Pipeline] properties
[Pipeline] node
Running on master in /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Checkout)
[Pipeline] checkout
Cloning the remote Git repository
Cloning repository https://github.com/MarkEWaite/git-plugin.git
 > git init /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA # timeout=11
Fetching upstream changes from https://github.com/MarkEWaite/git-plugin.git
 > git --version # timeout=11
 > git fetch --tags --progress https://github.com/MarkEWaite/git-plugin.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url https://github.com/MarkEWaite/git-plugin.git # timeout=11
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=11
 > git config remote.origin.url https://github.com/MarkEWaite/git-plugin.git # timeout=11
Fetching upstream changes from https://github.com/MarkEWaite/git-plugin.git
 > git fetch --tags --progress https://github.com/MarkEWaite/git-plugin.git +refs/heads/*:refs/remotes/origin/*
Checking out Revision 32cba0ffdeb475774c8208dfb49a971c2625eb56 (master-PR463-add-git-lfs)
 > git config core.sparsecheckout # timeout=11
 > git checkout -f 32cba0ffdeb475774c8208dfb49a971c2625eb56
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] timeout
Timeout set to expire in 5 min 0 sec
[Pipeline] {
[Pipeline] tool
[Pipeline] tool
[Pipeline] withEnv
[Pipeline] {
[Pipeline] isUnix
[Pipeline] sh
[ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA] Running shell script
+ /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/mvn/apache-maven-3.3.9/bin/mvn clean install -B -V -U -e -DskipTests
Picked up _JAVA_OPTIONS: -XX:MaxPermSize=160m -Xmx256m -Djava.awt.headless=true
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T09:41:47-07:00)
Maven home: /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/mvn/apache-maven-3.3.9
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /var/jenkins_home/tools/hudson.model.JDK/jdk7/jdk1.7.0_80/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-59-generic", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Jenkins Git plugin 3.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/git-client/2.3.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: http://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/git-client/2.3.0-SNAPSHOT/maven-metadata.xml (934 B at 0.9 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.6:clean (default-clean) @ git ---
[INFO] 
[INFO] --- maven-hpi-plugin:1.120:validate (default-validate) @ git ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:display-info (display-info) @ git ---
[INFO] Maven Version: 3.3.9
[INFO] JDK Version: 1.7.0_80 normalized as: 1.7.0-80
[INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 4.4.0-59-generic
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (display-info) @ git ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (default) @ git ---
[INFO] argLine set to -javaagent:/var/jenkins_home/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/target/jacoco.exec -XX:MaxPermSize=160m
[INFO] 
[INFO] --- maven-localizer-plugin:1.23:generate (default) @ git ---
[INFO] 
[INFO] >>> maven-javadoc-plugin:2.10.1:javadoc (default) > generate-sources @ git >>>
[INFO] 
[INFO] --- maven-hpi-plugin:1.120:validate (default-validate) @ git ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:display-info (display-info) @ git ---
[INFO] Maven Version: 3.3.9
[INFO] JDK Version: 1.7.0_80 normalized as: 1.7.0-80
[INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 4.4.0-59-generic
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (display-info) @ git ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (default) @ git ---
[INFO] argLine set to -javaagent:/var/jenkins_home/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/target/jacoco.exec -XX:MaxPermSize=160m
[INFO] 
[INFO] --- maven-localizer-plugin:1.23:generate (default) @ git ---
[INFO] 
[INFO] <<< maven-javadoc-plugin:2.10.1:javadoc (default) < generate-sources @ git <<<
[INFO] 
[INFO] --- maven-javadoc-plugin:2.10.1:javadoc (default) @ git ---
[INFO] Skipping javadoc generation
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ git ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 141 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ git ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 86 source files to /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/target/classes
[INFO] /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/src/main/java/hudson/plugins/git/GitStatus.java: Some input files use or override a deprecated API.
[INFO] /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/src/main/java/hudson/plugins/git/GitStatus.java: Recompile with -Xlint:deprecation for details.
[INFO] /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/src/main/java/hudson/plugins/git/GitSCM.java: Some input files use unchecked or unsafe operations.
[INFO] /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/src/main/java/hudson/plugins/git/GitSCM.java: Recompile with -Xlint:unchecked for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/src/main/java/hudson/plugins/git/extensions/impl/GitLFSPull.java:[42,16] cannot find symbol
  symbol:   method lfsRemote(java.lang.String)
  location: variable cmd of type org.jenkinsci.plugins.gitclient.CheckoutCommand
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.600 s
[INFO] Finished at: 2017-01-28T11:25:43-07:00
[INFO] Final Memory: 46M/194M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project git: Compilation failure
[ERROR] /var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/src/main/java/hudson/plugins/git/extensions/impl/GitLFSPull.java:[42,16] cannot find symbol
[ERROR] symbol:   method lfsRemote(java.lang.String)
[ERROR] location: variable cmd of type org.jenkinsci.plugins.gitclient.CheckoutCommand
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project git: Compilation failure
/var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/src/main/java/hudson/plugins/git/extensions/impl/GitLFSPull.java:[42,16] cannot find symbol
  symbol:   method lfsRemote(java.lang.String)
  location: variable cmd of type org.jenkinsci.plugins.gitclient.CheckoutCommand

	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
/var/jenkins_home/workspace/ne_master-PR463-add-git-lfs-SHNRWA3WOMH3VNQFYZQZWYDT3QTTDHBNG4A73FS3J3O36SH3HGFA/src/main/java/hudson/plugins/git/extensions/impl/GitLFSPull.java:[42,16] cannot find symbol
  symbol:   method lfsRemote(java.lang.String)
  location: variable cmd of type org.jenkinsci.plugins.gitclient.CheckoutCommand

	at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:972)
	at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
	... 20 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1 
Finished: FAILURE 

Daniel Beck

unread,
Jan 28, 2017, 3:28:03 PM1/28/17
to jenkin...@googlegroups.com

> On 28.01.2017, at 21:16, Mark Waite <mark.ea...@gmail.com> wrote:
>
> Log is appended to the end of the message.
>
> I'm building from https://github.com/MarkEWaite/git-plugin using branch master-PR463-add-git-lfs. It includes a dependency on git-client-plugin 2.3.0-SNAPSHOT which is built from https://github.com/MarkEWaite/git-client-plugin using branch master-PR232-support-lfs.

Weird. http://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/git-client/2.3.0-SNAPSHOT/git-client-2.3.0-20170128.183609-2.jar exists and has the method in the specified class (as well in the previously uploaded build from earlier today).

However, the build works for me. Messed up local repo perhaps? You don't specify the snapshot by date and time, so who knows what it actually includes from the local repo.

Mark Waite

unread,
Jan 28, 2017, 3:29:55 PM1/28/17
to jenkin...@googlegroups.com
If the build works for you, that's good enough for me.

I don't understand what's damaged about my local maven repository, but it doesn't take much to discard it and start a fresh cache.

Thanks,
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9ED22376-D978-4F77-ABAC-3B36E1A5BA34%40beckweb.net.

Mark Waite

unread,
Jan 28, 2017, 3:31:25 PM1/28/17
to Baptiste Mathus, Jenkins Developers
On Sat, Jan 28, 2017 at 1:15 PM Baptiste Mathus <m...@batmat.net> wrote:
Do you really want to go through the Artifactory UI? I don't even remember even opening it.


I am not interested in using the Artifactory UI.  I only used it as an attempt to confirm that the file I had uploaded was in fact visible there.  I didn't think to use the simpler approach of checking the directory listing with my web browser.  Should have done that first.

Thanks,
Mark Waite

 

I also tried on ath and it worked indeed. Great Daniel!

2017-01-28 21:07 GMT+01:00 Daniel Beck <m...@beckweb.net>:

> On 28.01.2017, at 19:56, Mark Waite <mark.ea...@gmail.com> wrote:
>
> when I try to download them from the web UI (or from my git plugin build), they fail to download.

I get that the UI fails, as the reverse proxy config is broken (see the extra 'jenkinsci' as web app context on download links on the UI) but that shouldn't matter for Maven (and changing the URL around results in successful download.

Could you share a build log with the error?
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

Jesse Glick

unread,
Jan 30, 2017, 10:04:32 AM1/30/17
to Jenkins Dev
On Sat, Jan 28, 2017 at 3:27 PM, Daniel Beck <m...@beckweb.net> wrote:
> You don't specify the snapshot by date and time

*Always* use a timestamped snapshot dependency:

<version>2.3.0-20170128.183609-2</version>

If you use just

<version>2.3.0-SNAPSHOT</version>

as in https://github.com/MarkEWaite/git-plugin/blob/ecab79f2cbfe7d8ff04bf1c7eac2b95b1baecaa6/pom.xml#L152
there is no telling what you might get.

And yes, if you update the upstream code, you must `mvn deploy` it
again and update the downstream `<version>` accordingly. Which may
sound like a hassle, but it is critical for reproducibility. (What if
you found some kind of regression from a late upstream commit and want
to `git bisect` it?)

BTW if you run into trouble with deployed snapshots (despite using
timestamps) it is also possible to use jitpack.io to refer to a
specific upstream commit, so long as both upstream and downstream
plugins are using a sufficiently recent parent, but you need to make
more intrusive changes to the downstream POM so I do not currently
recommend this unless you are pretty comfortable with Maven.

Mark Waite

unread,
Jan 30, 2017, 10:19:14 AM1/30/17
to Jenkins Dev
Thanks!  I was aware that I was accepting a risk by using a SNAPSHOT dependency, but didn't know that I could refer to a timestamped snapshot.  I've switched to the timestamped snapshot dependency.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages