Lab: Building a CD pipeline - exercise 8

Hello, exercise 8 is marked as red, even though everything works fine. The pipeline is successful and the image is tagged.

Successful pipeline:

Pipeline:

pipeline {
    agent {
        label {
            label 'master'
            customWorkspace "${JENKINS_HOME}/${BUILD_NUMBER}/"
        }
    }
    environment {
        Go111MODULE='on'
    }
    stages {
        stage ('Clone'){
            steps  {
                git 'https://github.com/kodekloudhub/go-webapp-sample.git'
            }
        }
        stage('Build Docker image') {
            steps {
                script {
                    sh 'docker build -t my-docker-image:latest .'
                }
            }
        }
        stage('Tag the mage') {
            steps {
                script {
                    sh 'docker tag my-docker-image:latest adminturneddevops/go-webapp-sample'
                }
            }
        }

        
    }
}

In addition, the checks take really long time and I almost ran out of time.

In the lab, we’re following one of the previous lectures, where the build process is done indirectly using a Go program. The code looks like this both in the lecture and in the lab:

        stage('Build') {
            steps {
                script{
                    image = docker.build("adminturneddevops/go-webapp-sample")
                }
            }
            
        }

This is different from the procedure you’re using above, which calls docker commands to attempt this directly. I’m not sure what the grader is doing exactly, but it appears to be different than what you might otherwise expect it to be.

Ok, got it, this is just related to Go. Thanks.