Skip to content
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

JENKINS-46085 containerLog step to get the logs of a container running in the slave pod #195

Conversation

marvinthepa
Copy link
Contributor

Please don't merge yet, as I will add the missing parameters that the API supports
(withTerminatedStatus sinceSeconds sinceTimestamp withTailingLines limitBytes).

I just wanted to get early feedback, especially on the way I extracted the common code from ContainerStepExecution.

Copy link
Contributor

@carlossg carlossg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add license headers to the new files to indicate that you are licensing it under Apache or MIT?
Thanks

@@ -321,6 +321,18 @@ public void declarative() throws Exception {
r.assertLogContains("Apache Maven 3.3.9", b);
}

@Issue("JENKINS-46085")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have this test in a new file ContainerLogStepTest.java, this one is getting too big

@marvinthepa marvinthepa force-pushed the feature/JENKINS-46085-container-log-pipeline-step branch from 947c1b9 to 414cd73 Compare August 16, 2017 08:50
@marvinthepa
Copy link
Contributor Author

@carlossg: implemented the missing parameters, added license headers, extracted the test, fixed the build, and rebased master.

@marvinthepa marvinthepa changed the title containerLog step to get the logs of a container running in the slave pod JENKINS-46085 containerLog step to get the logs of a container running in the slave pod Aug 16, 2017
@carlossg
Copy link
Contributor

carlossg commented Aug 17, 2017

I'm getting a test error with minikube

mvn clean test -Dtest=KubernetesPipelineTest#runWithExistingEnvVariables
...
Expected: a string containing "INSIDE_CONTAINER_ENV_VAR_LEGACY = container-env-var-value\n"

@marvinthepa marvinthepa force-pushed the feature/JENKINS-46085-container-log-pipeline-step branch from 414cd73 to 43cb9e4 Compare August 17, 2017 16:51
@marvinthepa
Copy link
Contributor Author

Right, I made a mistake when rebasing master (too tired, probably).

Please try again.

@carlossg carlossg merged commit 7847e3e into jenkinsci:master Aug 17, 2017
@carlossg
Copy link
Contributor

thanks!

@carlossg
Copy link
Contributor

One thing that is missing is adding some docs to the readme, if you can add a new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants