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

Configurable temporary file options, leave, respect TMPDIR environment, etc. #180

Open
pkshiner-ib opened this issue Feb 14, 2024 · 1 comment

Comments

@pkshiner-ib
Copy link

pkshiner-ib commented Feb 14, 2024

public static File createPomDumpFile() throws IOException {

My problems ( and yes, I realize this is a way out there outlier ):

  • The DevOps controls the pipeline and are building jobs in a container.
  • The pipeline is doing some post build actions, and end up looking for the /tmp/pom98791734.jgitver-maven-plugin.xml file to read.
  • The file is not there as it was "deleteOnExit()"
  • I think the post build actions are in a different container and the old /tmp files are gone anyway.

Idea:

  • have the temporary directory not be java.io.File's choice, but maybe use and environment variable: e.g. TMPDIR
  • have an option to leave the temporary file around ( yea, messy expect for odd-ball situations )

Othewise, this is a fantastic plugin and truly has been working great in more normal situations. >> Thank you!! <<

Open to your thoughts, especially if you have ever run into this before.

@pkshiner-ib
Copy link
Author

Upon sleeping on this request--it is a strange outlier and the code is so "clean" now. I don't see any value. Withdrawing from consideration.

More details of the situation:

  • Using the Jenkins Artifactory plugin
  • This plugin seems to "know" about the temporary file somehow, after the ( what I call ) the "first" maven run. Likely some reference is found to the temp file that is no longer present,
  • This plugin then "chokes" and bails on the rest of the process and kills the pipeline.
  • In my situation, the "pipeline authors" are not inclined to try and figure out what is going on so as a developer, sort of stuck.
  • The "first maven run" works great though--love the output and the way the plugin works.
  • I did think of "forking" but . . . upon sleeping on the issue that also is more work than the delivery timeline will allow.

Final Thoughts:

  • I am going to switch to Gradle from Maven and see if that makes a difference. I am thinking it won't create some temp file that would be "seen" by this Artifactory Jenkins plugin. If so, the problem will likely go away.
  • If I can I'll update with results in case others running across this sort of problem.

Thanks for all the work ya' all have put into this plugin and scheme to assist with managing version numbers.

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

No branches or pull requests

1 participant