Level 2: Introduce Go Tanuki Ascii converter to fix, SLSA attestation bonus
This rewrites level 2 to a more challenging exercise:
- Golang Tanuki that reads an image file, and uses a library to convert to ASCII art (coloured)
- The introduction string uses the event name and year
- The footer encourages to take a selfie for social, and contribute
The problem is that CI/CD tests are failing because the helloFrom value is wrong. If the deploy job would run, we would see the converted image.
Solution
The shortcut fix is easy: Fix the wrong year in main.go, commit, wait for CI/CD builds to continue, and inspect the deploy job's terminal output.
A second image is provided to show a different ASCII art, using the heart Tanuki - this is to encourage folks to unveil the easter egg, if they want.
The SLSA attestation JSON file is available in the build job, and later deploy job too, because the artifacts are exchanged between jobs too.
Technical background
image_test.go has a test function that always checks for the current year. This allows to update the global variable helloFrom in main.go only, in future iterations.
HELLO_FROM and IMAGE_PATH can be controlled via environment variables for easier testing when developing locally. Then the source code does not need to be modified that often.
