Skip to content

Instantly share code, notes, and snippets.

View GuillaumeSmaha's full-sized avatar
🤖
🤖

Guillaume Smaha GuillaumeSmaha

🤖
🤖
View GitHub Profile

Keybase proof

I hereby claim:

  • I am GuillaumeSmaha on github.
  • I am guillaumesmaha (https://keybase.io/guillaumesmaha) on keybase.
  • I have a public key whose fingerprint is 5E9A BAB5 B4D0 0E91 04B9 4A10 8E78 BA19 FF21 D83D

To claim this, I am signing this object:

@GuillaumeSmaha
GuillaumeSmaha / build-stages-status.groovy
Last active March 18, 2022 02:26
Functions to get stages executed and build state
import hudson.model.Action
import com.cloudbees.workflow.flownode.FlowNodeUtil
import com.cloudbees.workflow.rest.external.StatusExt
import org.jenkinsci.plugins.workflow.graph.FlowNode
import org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode
import org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode
import org.jenkinsci.plugins.workflow.actions.LabelAction
#!/usr/bin/env bash
function getMakefileVarRawValue {
local varName=$1
local packageDir=$2
local value=$(grep -oP "^$varName\s*(\+?)=\s*\K.+(?=(\s*#))" $ROOT"/"$packageDir"/Makefile")
if [ -z "$value" ]; then
value=$(grep -oP "^$varName\s*(\+?)=\s*\K.+" $ROOT"/"$packageDir"/Makefile")
fi