-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Ensure that Windows 2019 images have CURL when publishing incrementals #140
Conversation
This will allow windows to also run deploy
@@ -259,11 +259,17 @@ void prepareToPublishIncrementals() { | |||
void maybePublishIncrementals() { | |||
if (isRunningOnJenkinsInfra() && currentBuild.currentResult == 'SUCCESS') { | |||
stage('Deploy') { | |||
node('maven || linux') { | |||
node('maven || linux || windows') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could potentially drop the label spec if all windows nodes are using 2019 base.
If curl.exe is not already available on windows machine, feel free to add on the packer images. Link |
Nah it should already be there, Microsoft put it in :) https://devblogs.microsoft.com/commandline/tar-and-curl-come-to-windows/ This includes server and even docker images for both server core and nanoserver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great if it works, though pending INFRA-2544 it hardly matters anyway.
''' | ||
} else { | ||
bat ''' | ||
curl.exe -i -H 'Content-Type: application/json' -d '{"build_url":"'%BUILD_URL%'"}' "https://jenkins-community-functions.azurewebsites.net/api/incrementals-publisher?clientId=default&code=%FUNCTION_TOKEN%" || echo 'Problem calling Incrementals deployment function' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does '
work in batch scripts? Did you try this command with a -v
and a phony token environment variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested locally that the current string should work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://ci.jenkins.io/job/Plugins/job/azure-credentials-plugin/job/master/35/execution/node/102/log/ suggests this is broken:
FailRequestError: The incrementals-publisher invocation was missing the build_url attribute
at IncrementalsPlugin.main (D:\home\site\wwwroot\incrementals-publisher\index.js:133:13)
at module.exports (D:\home\site\wwwroot\incrementals-publisher\index.js:266:29)
at WorkerChannel.invocationRequest (D:\Program Files (x86)\SiteExtensions\Functions\3.0.13139\64bit\workers\node\worker-bundle.js:17928:26)
at ClientDuplexStream.WorkerChannel.eventStream.on (D:\Program Files (x86)\SiteExtensions\Functions\3.0.13139\64bit\workers\node\worker-bundle.js:17738:30)
at ClientDuplexStream.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at ClientDuplexStream.Readable.push (_stream_readable.js:224:10)
at Object.onReceiveMessage (D:\Program Files (x86)\SiteExtensions\Functions\3.0.13139\64bit\workers\node\worker-bundle.js:21909:19)
at InterceptingListener.module.exports.InterceptingListener.recvMessageWithContext (D:\Program Files (x86)\SiteExtensions\Functions\3.0.13139\64bit\workers\node\worker-bundle.js:21224:19)
at D:\Program Files (x86)\SiteExtensions\Functions\3.0.13139\64bit\workers\node\worker-bundle.js:21323:14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this was a copy paste error on my part.
curl.exe -i -H 'Content-Type: application/json' -d '{"build_url":"'%BUILD_URL%'"}' "https://jenkins-community-functions.azurewebsites.net/api/incrementals-publisher?clientId=default&code=%FUNCTION_TOKEN%" || echo 'Problem calling Incrementals deployment function' | |
curl.exe -i -H 'Content-Type: application/json' -d '{"build_url":"%BUILD_URL%"}' "https://jenkins-community-functions.azurewebsites.net/api/incrementals-publisher?clientId=default&code=%FUNCTION_TOKEN%" || echo 'Problem calling Incrementals deployment function' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After actually testing it against site. I noticed a few things such as encoding being URL encoded...
curl.exe -i -H 'Content-Type: application/json' -d '{"build_url":"'%BUILD_URL%'"}' "https://jenkins-community-functions.azurewebsites.net/api/incrementals-publisher?clientId=default&code=%FUNCTION_TOKEN%" || echo 'Problem calling Incrementals deployment function' | |
curl.exe -i -H "Content-Type: application/json" -d "{""build_url"":""%BUILD_URL%""}" "https://jenkins-community-functions.azurewebsites.net/api/incrementals-publisher?clientId=default&code=%FUNCTION_TOKEN%" || echo Problem calling Incrementals deployment function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will allow windows to also run deploy