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

Add xml header to the proxy template #1083

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marek130
Copy link

@marek130 marek130 commented Oct 10, 2023

Fixing problem of xml header. Restarting Jenkins service is adding this header.

Pull Request (PR) description

There is no possible to achieve the desired state by Puppet because the content of proxy.xml file is missing the XML header.
After restarting the Jenkins service the header is added automatically. So, there is a fight between the proxy template and Jenkins service.

Notice: /Stage[main]/Jenkins::Proxy/File[/var/lib/jenkins/proxy.xml]/content:
--- /var/lib/jenkins/proxy.xml  2023-10-10 09:34:29.396190879 +0200
+++ /tmp/puppet-file20231010-27492-128ipzr      2023-10-10 09:36:37.746168509 +0200
@@ -1,5 +1,4 @@
-<?xml version='1.1' encoding='UTF-8'?>
 <proxy>
   <name>company.com</name>
   <port>9443</port>
-</proxy>
\ No newline at end of file
+</proxy>

Fixing problem of restarting Jenkins service which caused adding this header.
@evgeni evgeni closed this Apr 25, 2024
@evgeni evgeni reopened this Apr 25, 2024
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the diff, it still wouldn't be idempotent since there is no line ending in the generated version while this template does. I wonder what the best way to achieve that is, because many tools actually try hard to ensure that.

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.

3 participants