-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Verifying that tools do not assume sh is in /bin/sh #490
Conversation
@@ -0,0 +1,7 @@ | |||
podTemplate(label: 'bourneShellElsewhereInPath', containers: [containerTemplate(name: 'kaniko', image: 'gcr.io/kaniko-project/executor:debug', command: 'sleep', args: '99d')]) { | |||
node('bourneShellElsewhereInPath') { | |||
container(name: 'kaniko') { |
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.
Without the ContainerExecDecorator
patch, this fails unless you
-container(name: 'kaniko') {
+container(name: 'kaniko', shell: '/busybox/sh') {
podTemplate(label: 'bourneShellElsewhereInPath', containers: [containerTemplate(name: 'kaniko', image: 'gcr.io/kaniko-project/executor:debug', command: 'sleep', args: '99d')]) { | ||
node('bourneShellElsewhereInPath') { | ||
container(name: 'kaniko') { | ||
sh 'ls -la /' |
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.
Without the BourneShellScript
patch, this fails unless you
-sh 'ls -la /'
+sh '''#!/busybox/sh -ex
+ ls -la /
+'''
+ ls -la / ls: can't open '/': Value too large for defined data type total 0
Probably due to: https://issues.jenkins-ci.org/browse/JENKINS-46076?focusedCommentId=368388&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-368388 java.lang.AssertionError: Expected: a string containing "Labels must follow required specs - https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set: mypod!123" but: was "Started Running in Durability level: MAX_SURVIVABILITY [Pipeline] podTemplate [Pipeline] // podTemplate [Pipeline] End of Pipeline " at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20) at org.junit.Assert.assertThat(Assert.java:956) at org.junit.Assert.assertThat(Assert.java:923) at org.jvnet.hudson.test.JenkinsRule.assertLogContains(JenkinsRule.java:1308) at org.csanchez.jenkins.plugins.kubernetes.pipeline.PodTemplateStepExecutionTest.testBadLabel(PodTemplateStepExecutionTest.java:85)
I'll hold this until there is a release of |
This reverts commit 575a8f8. Not clear that this would actually fix the flake. RCA in JENKINS-46076.
Co-Authored-By: Devin Nusbaum <[email protected]>
Not needed anymore since #490
Not needed anymore since jenkinsci#490
Downstream of jenkinsci/durable-task-plugin#95. @Vlatombe