Commit f644ef82 authored by carlosribas's avatar carlosribas
Browse files

Using bash commands

parent 45a29ccb
......@@ -22,7 +22,7 @@ pipeline {
steps {
script {
// get Docker Hub tags
def DOCKER_TAGS = sh (script: 'curl | python -c "import sys, json; result = json.load(sys.stdin); print(\"\n\".join(list(map(lambda x : x[\"name\"], result))))"', returnStdout:true).trim()
def DOCKER_TAGS = sh (script: 'curl | grep -zoP "name\":\s*\K[^\s,]*(?=\s*,)" | sed -e "s/^\"//" -e "s/\"}$//"', returnStdout:true).trim()
message: "Select a Docker Hub tag",
parameters: [choice(name: "TAG", choices: "${DOCKER_TAGS}", description: "Docker Hub tag")]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment