I installed a pipeline for a military project using Jenkins and build-pipeline-plugin . It consists of two actual assignments and a final manual assignment, which is deployed on Q & A.

Each of the tasks is configured to run the same project, activating different profiles. The first task - fast - is the default build, compiling the source code, and doing unit tests. The second task - the browser - runs the browser tests based on Selenium. The third task deploys a war file on a Q & A server.
Each work creates a new war file, which bothers me for two reasons:
- Even if only the required goals are fulfilled, for example. there are no tests when deploying to Q & A, the assembly still takes too much time, since there are many files in the WAR file.
- We rely on the build number from Jenkins to find out what the artifact is built from. So far, this has been the number from the "fast" work, but now it is the number from the qa-deploy task.
How to configure Jenkins and / or Maven to reuse artifacts from the first job?
I would prefer a solution that does not change the overall structure of the project, since our project has a single combat module, and its separation means a lot of work to document the changes, and it is easiest to have everything in one place.
source share