Week 9

Fri 27-09-2024 by benjamin

I spent a decent amount of time this week working on shell scripting. Having only really used shell commands for navigation and git this time spent writing scripts was really helpful. On Wednesday I wrote some very small scripts to run all my unit tests in docker. Yesterday I set up a deployment pipeline on bitbucket, doing this with a shell script that pulls the git repository down to a remote server. These were both very simple scripts but today I made a migration system which was slightly more complex. When changes are made to my main bitbucket branch, my deployment pipeline runs my database migration script. This script runs through a migration folder checking filenames against a MySql table to check for migration files that haven't been run yet. This has given me a good feel for shell syntax and the following in particular, -Conditional logic and looping through file systems -Using MySql from the command line -Parameter/variable assignment On Thursday I deployed my blog project. A lot of this was just setting up the same settings I had done for docker but on a remote server. I did this all through the command line which taught me a few new commands, -sudo nano <filename> to write to a file -chmod to change a file/directories permissions