0

I am trying to create a so-called proxy page which will accept user parameters in Jenkins and then pass them to url for running pipeline with specified parameters.

I am trying to achieve it with the help of userContent Jenkins feature:

<font face="verdana" size="2px">
   <form action="http://user:token@jenkinshost:port/job/dev/job/dev-pipeline/buildWithParameters?n1" method="post">
       Number1:<input type="text" id="n1" name="n1"><br>
       <input type="submit" value="Submit">
  </form>
</font>

But nothing works.

I was even trying to set up the next policy through Jenkins console:

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox allow-same-origin allow-scripts; default-src 'self'; script-src * 'unsafe-eval'; img-src *; style-src * 'unsafe-inline'; font-src *");

It also didn't work.

Am I doing something wrong by missing something?

1

Looks like I read documentation not attentively.

userContent supports only static content but not dynamic.

Thus, PHP/JS or something similar can not be used there: https://wiki.jenkins.io/display/JENKINS/User+Content

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.