2023-07-13 17:19:45 +10:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Files') {
|
|
|
|
steps {
|
2023-07-13 17:26:08 +10:00
|
|
|
sh returnStdout: true, script: '''for file in "$directory"/*.html; do
|
|
|
|
if [[ -f "$file" ]]; then
|
|
|
|
sed -i \'s/\\(<link rel="canonical" href="\\)\\(.*\\)\\(.html" \\)/\\1\\2\\3/\' "$file"
|
|
|
|
echo "Modified: $file"
|
|
|
|
fi
|
2023-07-13 17:19:45 +10:00
|
|
|
done'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|