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

Move all pipelines to be fully scripted #49774

Merged
merged 1 commit into from Sep 25, 2018

Conversation

Projects
None yet
3 participants
@KaiSforza
Copy link
Contributor

commented Sep 25, 2018

This allows us to properly clean out the workspace before a job run.

What does this PR do?

Changes the Jenkinsfiles to use scripted pipelines, not declarative pipelines. Should fix the failures we were getting with old workspaces being used. Not sure exactly how it's going to work if we are actually using old workspaces...but this should make new builds work.

What issues does this PR fix or reference?

Not cleaning up our workspace before the build. We now clean the workspace, clone the git repo, and then do the build.

Commits signed with GPG?

Yes

@gtmanfred @dubb-b @rallytime

Move all pipelines to be fully scripted
This allows us to properly clean out the workspace before a job run.
@KaiSforza

This comment has been minimized.

Copy link
Contributor Author

commented Sep 25, 2018

This jenkins job was run with the new scripted pipeline, only ran a single test for speed, though.

https://jenkinsci.saltstack.com/job/pr-kitchen-centos7-py2/job/PR-48809/43/console

@damon-atkins

This comment has been minimized.

Copy link
Member

commented Sep 25, 2018

The agent statement cleans up when it checks out the scm. For example if each stage had a agent line it would clean up between stages.

You can also set this in the stage
options { skipDefaultCheckout() }
and then do your own

cleanWS 
checkout scm

There is no need to convert to "fully scripted"

@KaiSforza

This comment has been minimized.

Copy link
Contributor Author

commented Sep 25, 2018

@damon-atkins Looking back at some of the tests, it was only cleaning up on successful builds if it got to the end, the agent statement wasn't doing anything to clean up.

There are also other reasons why I want to convert to a scripted style, as well.

@damon-atkins

This comment has been minimized.

Copy link
Member

commented Sep 25, 2018

Maybe in post the junit was failing and it never reached the cleanWS

By the way the BlueOcean interface works well for users, makes the logs and unit tests easier to read as well.

@KaiSforza

This comment has been minimized.

Copy link
Contributor Author

commented Sep 25, 2018

@damon-atkins That's what I think was happening. Again, this isn't just because of the failed cleanups, but other stuff we want to do that can't be done in the declarative pipelines.

Us devops people have been wanting to switch over to it, I personally want it, but there are reasons we haven't switched.

@gtmanfred gtmanfred merged commit 8a71a43 into saltstack:2017.7 Sep 25, 2018

8 of 10 checks passed

jenkins/pr/py2-centos-7 The py2-centos-7 job has failed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has failed
Details
WIP ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.