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 PR validation pipeline definition into scala/scala #240

Closed
2 tasks
retronym opened this issue Feb 12, 2018 · 1 comment
Closed
2 tasks

Move PR validation pipeline definition into scala/scala #240

retronym opened this issue Feb 12, 2018 · 1 comment
Assignees

Comments

@retronym
Copy link
Member

retronym commented Feb 12, 2018

Jenkins now supports, and gently recommends, storing the CI pipeline definitions in the repository being built (aka a Jenkinsfile). The advantages I see in this approach are: 1) the pipeline definition contains calls to build scripts and targets, so it is easier to coordinate changes when a single commit can change the build definition and the way it is invoked in the pipeline, and 2) changes to the pipeline definition can be treated with the same processes as other code changes (version controlled, code reviewed).

I see three challenges in migrating to this approach.

Security

Currently, we rely limit which jobs can be run on particular build agents by statically tagging the job definitions with the "Restrict where this job can be run" configuration. But pipeline definitions can apparently bypass this. Even though changes to the in-repo Jenkinsfile are code reviewed before merge, our PR validation might run an untrusted Jenkinsfile from a pull-request, and we need to make sure this can only run on our public nodes. The Job Restrictions plugin might come the the rescue here.

  • evaluate and implement select the right measure(s) for restricting untrusted builds to running on the public node.

Backwards compatibility

As we migrate to using a Jenkinsfile, we ideally don't want to break all in-flight pull requests, or the ability to re-run builds on historical commits. I think it is possible to have a pipeline defined in the traditional way (as Jenkins config), that checks for the existence of a Jenkinsfile, and dynamically loads that if it exists, otherwise uses the static config.

  • Test out this facility

Externalizing particulars of our build cluster

We don't want to hard code too many details, especially ones that might change, of our build cluster into the scripts. Use a Pipeline Shared Library to abstract over such details.

@SethTisue
Copy link
Member

we're doing scala/scala-dev#507 instead

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

No branches or pull requests

2 participants