use jenkin’s ExtendedChoiceParameterDefinition for multi-select user input

Check Jenkins’ own documentation for an unnecessarily complicated but at least almost complete overview of available input declarations: https://jenkins.io/doc/pipeline/steps/pipeline-input-step/ Get a list of available types here: https://github.com/jenkinsci/extended-choice-parameter-plugin/blob/master/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterDefinition.java#L90 Get a list of all parameters of the ExtendedChoiceParamterDefinition here: https://github.com/jenkinsci/extended-choice-parameter-plugin/blob/master/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterDefinition.java#L344 This SO was useful to get an idea of how to use it in pipelines and resulted… Continue Reading use jenkin’s ExtendedChoiceParameterDefinition for multi-select user input

Docker: TaskNuke remove those annoying orphaned tasks from a network

The setting: $ docker network rm myNetwork Error response from daemon: rpc error: code = FailedPrecondition desc = network kny0nsuae9ymnpzjzufrefn9a is in use by task iczzsz7yrrafhn08y1slnhr8l The solution: $ docker pull dperny/tasknuke! $ docker run -v /var/run/docker/swarm/control.sock:/var/run/swarmd.sock dperny/tasknuke iczzsz7yrrafhn08y1slnhr8l iczzsz7yrrafhn08y1slnhr8l The glorious source: success.docker.com РHow to force remove an orphaned task from a network

Generate new ssh key

Generating a new keypair with good key length: ssh-keygen -b 4096 -t rsa -C “<some comment here, like platform, user or computer name>” -f ~/.ssh/id_rsa  

PHP: Disable var_dump() from truncating data

Dear fellow PHP coders, does that look familiar? array(3) { ‘something’ => string(6) “blabla” ‘something else’ => string(8) “more bla” ‘something threlse’ => array(2) { ‘test1’ => … ‘test2’ => … } } Exactly…var_dump() truncating data… Naveen S Nayak to the rescue!!! Add this to your php.ini: xdebug.var_display_max_data = -1 xdebug.var_display_max_children = -1 xdebug.var_display_max_depth =… Continue Reading PHP: Disable var_dump() from truncating data

PHP – What does a function with boolean return values return, if it can’t return a boolean?

Let’s regard this function: /** * @return bool */ private function testThis() { if(false) { return true; } } This will obviously not ever return its return statement. What does this function actually return? It turns out: This function returns null