org.apache.camel:camel-package-maven-plugin:2.22.0-SNAPSHOT or one of
its dependencies could not be resolved: Could not find artifact
apache.snapshots (http://repository.apache.org/snapshots/) -> [Help 1]
good catch! The `Deploy` stage was using `install` phase whereas it
should invoke the maven-deploy-plugin (i.e. `deploy:deploy`). Let's
see if artifacts get deployed in pipeline build 140.
I've also configured 4h polling period, seems that master wasn't built
from 15th, I'm not 100% sure if this is an issue with gitpubsub or
with the way the job is configured. From what I understand Jenkins
should be notified of any change to any ASF git repository.
no luck, the build failed on `bom-generator-maven-plugin` because no
Maven artefact was attached for that module in Maven reactor. I've
replaced the `install` goal in `Build` stage with `deploy` as at that
point the Maven reactor is populated.
Previously deploying to ASF Maven repository was done by Jenkins Maven
plugin which kept track of all produced artefacts so it can be
performed separately from the main Maven build. With pipeline that is
no longer possible.
I've added `deployAtEnd` flag so we deploy to the repository only if
the build passes. This doesn't mean that the -SNAPSHOT artefacts in
pass code checks or unit/integration tests, but that's how it used to
work with in the previous job constalation.
Hi Pascal & Cameleers,
well, seems that I have found a way to deploy to the ASF Maven
repository, it adds another 1h to the build though.
The change is on `test-jenkinsfile` branch and it restores the
`Deploy` stage right after the `Build` stage, this is similar to the
way we had *-notest builds that deployed before pipeline.
Because we're now using Jenkins pipeline and not the Maven plugin
to make the deploy all-or-nothing we need to do this in Maven two
invocations as `deployAtEnd` for `maven-deploy-plugin` didn't seem to
do the trick.
So the question is, are we OK with adding another hour to the build or
should we loose the all-or-nothing deploy and deploy in the `Build`
Can we have another pipeline that just does the deploy?
Then we can have the deploy to run once per day.
And if we are in need of a quicker SNAPSHOT we can kick the job
manually, and it would take 1h
And then have this pipeline that does the testing.
If we only build SNAPSHOT after a 100% successfull complete pipeline
with all testing etc. Then it may delay and take days/weeks.
There can be odd / weird test failures once in a while. So I would
like to separate them, and have up-to-date SNAPSHOTs
If we have 1 pipeline then I am okay with the deploy in the build
phase, so a SNAPSHOT is up-to-date.
On Wed, Mar 21, 2018 at 7:48 AM, Zoran Regvart <[hidden email]> wrote:
On Wed, Mar 21, 2018 at 9:04 AM, Claus Ibsen <[hidden email]> wrote:
> Can we have another pipeline that just does the deploy?
> Then we can have the deploy to run once per day.
> And if we are in need of a quicker SNAPSHOT we can kick the job
> manually, and it would take 1h
We can, but that one also can't be all-or-nothing without taking two
steps -- so two hours. If that `deployAtEnd` was working out it can be
all-or-nothing within the same Maven invocation, otherwise it has to
be two invocations (for all-or-nothing). Insert picture of sad puppy
> And then have this pipeline that does the testing.
> If we only build SNAPSHOT after a 100% successfull complete pipeline
> with all testing etc. Then it may delay and take days/weeks.
> There can be odd / weird test failures once in a while. So I would
> like to separate them, and have up-to-date SNAPSHOTs
> If we have 1 pipeline then I am okay with the deploy in the build
> phase, so a SNAPSHOT is up-to-date.
I think it's probably best to have a single pipeline and a `Build &
Deploy` stage. Let me make that change.
I've made few refinements to the Jenkins pipeline. Now only `master`
branch's artefacts are pushed to Maven repository, and failing
Checkstyle checks no longer prevents tests from being run.
It's a good idea to keep an eye on any Checkstyle issues to have a
smoother release as those will fail release builds. A URL that you can
bookmark to see Checkstyle issues is: