Workshop
Hey, you made it through the setup, congratulations!
You are now ready for the actual workshop.
Workshop Files
Before you begin, it is important that you know how the workshop files you will be working with are laid out.
Inside the repository that you pulled down via a git clone during the workshop setup,
you should notice a services/ directory. This contains all the files you will be editing for the workshop.
Go ahead and navigate to there and check out what is inside.
cd services/ \
&& ls ./
You should notice a series of subdirectories, one for each "service" we will be offering to our users.
Inside of each services/ subdirectory, there will be a set of files that compromise the service.
For each file required for the service, there will also be a *.solution file.
Each portion of the workshop will involve following the instructions to update the file to match the solution.
As we go through each file, will be given a few moments to figure out the changes that need to be made to each file before overriding the original file with the solution file and moving on to the next file.
Compose
The compose/ subdirectory contains:
entrypoint.sh-- Abashscript that will perform some pre-checks before calling theshellcheckutilityDockerfile-- A container image definition for a container used to containshellcheckand your wrapper script (entrypoint.sh)compose.yml-- Adocker composefile used to call theentrypoint.shscript inside of your container image which is defined via yourDockerfile
This service provides a way to call shellcheck via docker so that uses have an OS-agnostic, portable way of calling shellcheck to lint their bash scripts.
All or parts of this service will be wrapped, managed, and orchestrated by the other two services, so we will start with this one first.
Hooks
The hooks/ subdirectory contains:
pre-commit.lefthook.yml-- A file used to define custom pre-commitgithook that is managed via thelefthookutility
This service allows users to lint their bash scripts before committing their code and pushing it to a remote branch stored in Gitlab.
Pipelines
The pipelines/ subdirectory contains:
shellcheckit.gitlab-ci.yml-- A file used to define a custom GitlabCI pipeline job that runsshellcheckto lintbashscripts
This service allows users to lint their bash scripts after committing their code and pushing it to a remote branch stored in Gitlab.