h2oai / h2o-jenkins-pipeline-lib Goto Github PK
View Code? Open in Web Editor NEWLibrary of different Jenkins pipeline building blocks.
License: Apache License 2.0
Library of different Jenkins pipeline building blocks.
License: Apache License 2.0
It would be helpful to report stage start time here:
Instead of "In progress" i would like to see "In progress from 12:33am"
CC: @michal-raska
Looks like the s3up
is not able to use the parent job's env variable on jenkins and reads it as null, which forces us to extract values from env before using the s3up.
Failing example:
s3up {
...
version = "${env.BUILD_ID}"
...
}
Add a health check mechanism. It should check the health of given node (based on configurable metrics) and if the node is healthy, the proceed with the stage (build, test, etc.). If not, then mark this node as unhealthy and move to next healthy node. Retry this up to n (something like n=5) times.
By default it'll check two things:
$HOME
(because we need to store pipeline data somewhere) and in /
(because of docker, etc.)If either of the checks fails, then the node will be marked as unhealthy (internally by HealthChecker, nothing is changed in Jenkins).
The API should look something like:
// Instantiate.
HealthChecker healthChecker = HealthChecker.getDefaultInstance()
// Set base label, will be used as base for finding nodes. In practice, the label will look like <BASE_LABEL> && !<UNHEALTHY_1> && !<UNHEALTHY_2>...
healthChecker.setBaseLabel('docker && linux && !micro')
// Set number of max retries to 5.
healthChecker.setMaxRetries(5)
// Add custom check.
// CustomCheck should be Closure, which returns boolean value and takes no parameters.
def customCheck = {
return new File('/path/to/required/file').exists()
}
// Add the check to healthChecker under 'required-file-check' key. If such key already exists, it'll be overridden.
healthChecker.addCheck('required-file-check', customCheck)
// Remove space requirement check (for whatever reason).
healthChecker.removeCheck(HealthChecker.SPACE_REQUIREMENT_CHECK_ID)
// Main pipeline code.
// HealthyNode ensures the stage will be executed on healthy node.
healthyNode {
stage('Build') {
// build steps
}
}
healthyNode {
stage('Test') {
// test steps
}
}
Issues are following:
We are using something very similar (a bit simplified version) in H2O-3, and it works well. For example this might be helpful for Datatable and possibly Sparkling Water as well (@jakubhava is planning to move to dockerized pipelines). Both projects use scripted pipelines.
WDYT @mmalohlava and @jakubhava ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.