From e94c2c66a87efa125febc4a3e9a2b9e9a70a0bff Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 13 Jul 2023 18:59:59 +1000 Subject: [PATCH] cd: Cleaned up canonical name test --- Jenkinsfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 214465c..fe44095 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,23 +2,18 @@ pipeline { agent any stages { - stage('Check HTML Files') { + stage('Verify canonical tags') { steps { - // Search for occurrences of the file name with the .html extension script { def fileExists = false - - // Find files with occurrences of the file name with the .html extension def affectedFiles = sh( script: 'find . -type f -name "*.html" -exec grep -l "{}" "{}" \\;', returnStdout: true ).trim() - // If affectedFiles is not empty, set fileExists to true if (affectedFiles) { fileExists = true } - // Fail the build and display the affected files if (fileExists) { error("Error: Found occurrences of file names with the .html extension in the following files:\n${affectedFiles}")