Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not working properly when i used to send the console output in email using jenkins pipeline #279

Open
saikrishna1488 opened this issue Feb 14, 2024 · 1 comment
Labels

Comments

@saikrishna1488
Copy link

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Both are amazon linux 2

Reproduction steps

I am using below jenkins pipeline

pipeline {
    agent { label 'docker_node' }
    options {
        ansiColor('css')
    }
    stages {
        stage('Run Command in Directory') {
            steps {
                script {
                    sh 'docker-compose up'
                }
            }
        }
    }
    post {
        success {
            emailext(
                to: "[email protected]",
                subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}",
                body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\nMore info at: ${env.BUILD_URL}",
                attachmentsPattern: '**/*.log',
                mimeType: 'text/html',
                attachLog: true 
            )
        } 
        failure {
            emailext(
                to: "[email protected]",
                subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}",
                body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\nMore info at: ${env.BUILD_URL}",
                attachmentsPattern: '**/*.log',
                mimeType: 'text/html',
                attachLog: true
            )
        }
    }
}

Expected Results

Screenshot 2024-02-14 180109

Actual Results

image

Anything else?

No response

Are you interested in contributing a fix?

No response

@saikrishna1488 saikrishna1488 changed the title It is working properly when i used to send the console output in email using jenkin s It is not working properly when i used to send the console output in email using jenkin s Feb 14, 2024
@saikrishna1488 saikrishna1488 changed the title It is not working properly when i used to send the console output in email using jenkin s It is not working properly when i used to send the console output in email using jenkins pipeline Feb 14, 2024
@harrypotter033
Copy link

@saikrishna1488 Hi Saikrishna, I am also trying to find the similar solution, and i am using cypress docker image for some GUI testing. I am using [Jenkins 2.375.1] and i cant use new jenkins so i am using older ansicolor plugin. not sure which ansicolor version support my jenkins. Do you able to resolve this issue and have any solution. Please let me know
THank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants