Hi everyone,
I have exhausted the possible solutions I have found on internet before posting my issue here and I’m hoping someone has faced a similar problem or at least could offer me some idea of what could be happening here.
In one of my declarative pipelines I have something like this:
def status = "Failed 🔴"
...
str = "#### terraform plan ${status}\n ${planResult}<details><summary>Show Output</summary>\n\n```hcl\n${output}\n```\n</details>\n\n*Dataset: `${ds}`, Working Directory: `${tfWorkingDir}`*"
def comment = pullRequest.comment(str)
previous code is supposed to write a pull request comment with the text from str
. The pipeline was working as expected before I needed to extend the size of the disk/volume dedicated to my jenkins_home
. After this event, my Jenkinsfile hasn’t changed in any way but now the pipeline is writing wrong characters on the Pull Request comments (terraform plan failed ����
) where it should be writing terraform plan failed 🔴
as before.
To give you more context. My jenkins infrastructure is deployed using official helm chart and recently changed the storageClass of the PV used for jenkins_home
, for that reason I needed to back it up from the old volume and restore it on the new one. The backup process was manually executed and I basically have compressed the entire jenkins_home using standard options of tar, provisioned the new PV and then uncompressed the backup on the new volume.
Internet search results have suggested this could be related to file encoding so I tried using -Dfile.encoding=UTF8
without any positive result. I don’t really get what could be the issue here since jenkins is supposed to pull from my github repo the Jenkinsfile with the right encoding and characters.
Thank you in advance