Groovy web console

subscribe to the feed Subscribe
to this
site
Parse logs (via #groovywebconsole)
tweet this snippet Tweet
this
script

Parse logs

Published 3 months ago by Florian with tags regexp
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
String logs = '''
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] node Running on srv-vid-tux46-2 in /data/vidal/workspace/team.software/upload
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] {
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] stage
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] { (Declarative: Tool Install)
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LC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P9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA  [0m[Pipeline] stage
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] { (Download)
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] deleteDir
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] echo
I'm in download stage
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] }
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] // stage
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] stage
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] { (Upload)
Post stage
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] echo
I'm in upload stage
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] echo
it's so cool
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] script
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] { [Pipeline] }
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] // script
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] }
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] // stage
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] }
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] // withEnv
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] }
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] // node
[8mha:////4Nc+fy1+C4iwA9uTV4aH36Ljg1SpBqkAQVavx0sKAapnAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA [0m[Pipeline] End of Pipeline
'''
String stageName = "Download"
String logCleaned = (logs =~ /(?ms).*\[Pipeline\]\s+\{\s+\(${stageName}\)(.*?)\[Pipeline]\s+\/\/\s+stage.*/)[0][1]

logCleaned.trim()