Debugging issues with a freestyle job
Whenever you run a build in Jenkins for a build item, you can see all the details of the build by clicking on the specific build job that you want to see.
Build Project View
Here is the Build History
that you need to focus on:

Now if you click on an actual build, you will go to the following screen:

If you click the Console Output
link, then you will see a detailed CI Build log that shows all the steps the CI server did. Remember that we wrote a freestyle shell script. I'm adding the contents of the shell script for you to see:
echo "$SAMPLE_VALUE" echo "$ANOTHER_SAMPLE_NAME" go test
Notice here that I added the two different environment variables that we defined earlier and I'm simply sending them to the standard output.
Now if you look at the output of the build job, you will see the following output:

Notice here that Jenkins starts the job by running as the currently logged in user. Next, the EnvInject Plugin runs and injects any environment variables that...