Deploying Changes

From Inside Your Local Container

Once you are done with your changes and are ready to deploy, simply git commit and git push.

From your Desktop Machine

You can use this one liner:

1
handbookBuild

Handbook Build from Container

If you would prefer to be able to do the whole process from inside the container then simply do this:

1
2
3
4
5
6
7
8
9
cat <<EOF >> ~/mkDocs/bashrc.inc.bash
function handbookBuild(){
    echo "building handbook on ec-internal-jira container"
    echo "bash -c 'cd /var/www/vhosts/mkdocs; git pull; mkdocs build'" | ssh ec@192.168.236.107 -p9516
    echo "done..."
}
EOF

ssh-copy-id ec@192.168.236.107 -p9516

And then you can run handbookBuild from inside your local container

Step by Step

You then need to sshContainer 107 to get a session on the ec-internal-jira container on cluster1.

From Inside the Cluster Container

You then need to do the following:

1
2
3
cd /var/www/vhosts/mkdocs
git pull
docsBuild

If you want to check the handbook (or any site) for broken links, you can use these BASH commands to assist:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#wget spider the site, don't save anything, log output to /tmp/wget.spider.log
wget --spider -r -p -nd -o /tmp/wget.spider.log https://www.edmondscommerce.co.uk/handbook/

#grep the output for any requests that did not return a 2XX response
grep -P '^HTTP request sent, awaiting response\.\.\. [^2]\d\d' /tmp/wget.spider.log -B 2 -A 2

#log issues to file:
echo 'Issues Found' > /tmp/wget.spider.issues.log

#Find broken 301s
grep -P 'redirections exceeded' /tmp/wget.spider.log -B 4 > /tmp/wget.spider.issues.log

#Find 4XX requests
grep -P '^HTTP request sent, awaiting response\.\.\. [4]\d\d' /tmp/wget.spider.log -B 2 -A 2 > /tmp/wget/spider.issues.log