Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mavenBuild: add the possibility to define stash groups need to be stashed/unstashed #4573

Merged
merged 5 commits into from
Oct 9, 2023

Conversation

vstarostin
Copy link
Member

@vstarostin vstarostin commented Sep 18, 2023

Changes

This PR adds the possibility of defining stash groups that need to be unstashed into container. The default value is 'source' to keep existing behavior and not break existing pipelines. We are not adding any default stash group to not change existing behavior and not break existing pipelines.

To set custom stash groups need to be unstashed into container, please set:

steps:
   mavenBuild:
      stashContent: ['source', 'git']
      ...

This PR is pretty much the same as #2271 (#2285) for npmExecuteScripts step.

  • Tests
  • Documentation

@vstarostin vstarostin marked this pull request as ready for review September 18, 2023 13:29
@vstarostin vstarostin requested a review from a team as a code owner September 18, 2023 13:29
@vstarostin
Copy link
Member Author

/it-go

@vstarostin vstarostin changed the title mavenBuild: add the possibility to define stash groups need to be stashed mavenBuild: add the possibility to define stash groups need to be stashed/unstashed Sep 28, 2023
@CCFenner
Copy link
Member

CCFenner commented Sep 29, 2023

Where was this unstashed before? Is there something we need to remove?

@vstarostin
Copy link
Member Author

vstarostin commented Sep 29, 2023

Where was this unstashed before? Is there something we need to remove?

@CCFenner No, nothing needs to be removed.
The source stash group was created at the very end of Init stage, then unstashing of source is happening at the beginning of the build stage. Unstashed files are used by steps of build stage.
Then mavenBuild creates the k8s pod and unstashes source directly into the pod’s filesystem.

@zomp1337
Copy link

zomp1337 commented Oct 9, 2023

@vstarostin is this PR going to be merged today?

@vstarostin
Copy link
Member Author

/it-go

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@vstarostin
Copy link
Member Author

@CCFenner, @anilkeshav27 FYI: I removed the default source stash group to not change existing behaviour and not break existing pipelines (df4f9c1).

@vstarostin vstarostin merged commit 7ab2386 into master Oct 9, 2023
@vstarostin vstarostin deleted the vstarostin/maven-build-stash branch October 9, 2023 09:52
daskuznetsova pushed a commit to daskuznetsova/jenkins-library that referenced this pull request Oct 13, 2023
…be stashed/unstashed (SAP#4573)

* Add stash param to mavenBuild

* go generate

* Delete default stash group

---------

Co-authored-by: Anil Keshav <[email protected]>
andrew-kireev pushed a commit that referenced this pull request Oct 17, 2023
…be stashed/unstashed (#4573)

* Add stash param to mavenBuild

* go generate

* Delete default stash group

---------

Co-authored-by: Anil Keshav <[email protected]>
maxatsap pushed a commit to maxatsap/jenkins-library that referenced this pull request Jul 23, 2024
…be stashed/unstashed (SAP#4573)

* Add stash param to mavenBuild

* go generate

* Delete default stash group

---------

Co-authored-by: Anil Keshav <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants