Reduced escaping and use multiline
This commit is contained in:
parent
51c379a8aa
commit
0db8eb8379
|
@ -33,10 +33,19 @@ def call(Map args) {
|
|||
returnStdout: true).trim()
|
||||
}
|
||||
|
||||
if (uploadedUrl =~ /https\:\/\//) {
|
||||
if (uploadedUrl =~ 'https://') {
|
||||
/* if the output was a URL, generate our redirect file */
|
||||
String redirectFile = "${args.artifacts}.html"
|
||||
String redirectHtml = "<html><head><meta http-equiv=\"refresh\" content=\"0;URL=${uploadedUrl}\" /><title>Redirecting...</title></head><body><center>${args.artifacts} can be downloaded <a href=\"${uploadedUrl}\">from Azure</a></center></body></html>"
|
||||
String redirectHtml = """<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL=${uploadedUrl}" />
|
||||
<title>Redirecting...</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>${args.artifacts} can be downloaded <a href="${uploadedUrl}">from Azure</a></center>
|
||||
</body>
|
||||
</html>"""
|
||||
writeFile file: redirectFile, text:redirectHtml
|
||||
steps.archiveArtifacts redirectFile
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue