diff --git a/public/blog/index.html b/public/blog/index.html index 3d958438..4597ddd4 100644 --- a/public/blog/index.html +++ b/public/blog/index.html @@ -387,10 +387,13 @@

The automated workflow I use to manage this website

24 July 2023
-

EDIT: This article is slitghly outdated as the workflow I use to maintain this website has evolved and improved over time. I’ll eventually write a V2 of that article at some point.

-

The website

+

The website

This website is built with the HUGO static website generator using the anatole theme.
-The website’s source code is hosted in this GitHub repository.

+The website’s source code is hosted in this GitHub repository.

+

Automated CI / CD workflow

+

I make my changes (e.g. creating an new article, update the theme, add new parameters to the website, etc…) locally on my computer inside the git repository in the dev branch.
+Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, …) are done in my local git repository on the dev branch.
+Once the changes are pushed to the above GitHub repository, I create a pull request from the dev branch to the main one, which triggers CI / CD pipelines (which run on my own self-hosted runners):

[...]

Read More
diff --git a/public/blog/index.xml b/public/blog/index.xml index a42aa3f8..98af8d8e 100644 --- a/public/blog/index.xml +++ b/public/blog/index.xml @@ -55,10 +55,13 @@ After a quick thought, I understood that a power outage occurred during the nigh https://antiz.fr/blog/website-workflow/ - <p>EDIT: This article is slitghly outdated as the workflow I use to maintain this website has evolved and improved over time. I&rsquo;ll eventually write a V2 of that article at some point.</p> -<h2 id="the-website">The website</h2> + <h2 id="the-website">The website</h2> <p>This website is built with the <a href="https://gohugo.io/">HUGO</a> static website generator using the <a href="https://github.com/lxndrblz/anatole">anatole</a> theme.<br> -The website&rsquo;s source code is hosted in <a href="https://github.com/Antiz96/antiz.fr/">this GitHub repository</a>.</p> +The website&rsquo;s source code is hosted in <a href="https://github.com/Antiz96/antiz.fr/">this GitHub repository</a>.</p> +<h2 id="automated-ci--cd-workflow">Automated CI / CD workflow</h2> +<p>I make my changes <em>(e.g. creating an new article, update the theme, add new parameters to the website, etc&hellip;)</em> locally on my computer inside the git repository in the <code>dev</code> branch.<br> +Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, &hellip;) are done in my local git repository on the <a href="https://github.com/Antiz96/antiz.fr/tree/dev"><code>dev</code> branch</a>.<br> +Once the changes are pushed to the above GitHub repository, I create a pull request from the <code>dev</code> branch to the main one, which triggers CI / CD pipelines (which run on my own self-hosted runners):</p> diff --git a/public/blog/website-workflow/index.html b/public/blog/website-workflow/index.html index 869dc734..793335a9 100644 --- a/public/blog/website-workflow/index.html +++ b/public/blog/website-workflow/index.html @@ -127,9 +127,11 @@ - + @@ -137,9 +139,11 @@ - + @@ -162,7 +166,7 @@ "alternativeHeadline": "", "description": " - \u003cp\u003eEDIT: This article is slitghly outdated as the workflow I use to maintain this website has evolved and improved over time. I\u0026rsquo;ll eventually write a V2 of that article at some point.\u003c\/p\u003e\n\u003ch2 id=\u0022the-website\u0022\u003eThe website\u003c\/h2\u003e\n\u003cp\u003eThis website is built with the \u003ca href=\u0022https:\/\/gohugo.io\/\u0022\u003eHUGO\u003c\/a\u003e static website generator using the \u003ca href=\u0022https:\/\/github.com\/lxndrblz\/anatole\u0022\u003eanatole\u003c\/a\u003e theme.\u003cbr\u003e\nThe website\u0026rsquo;s source code is hosted in \u003ca href=\u0022https:\/\/github.com\/Antiz96\/antiz.fr\/\u0022\u003ethis GitHub repository\u003c\/a\u003e.\u003c\/p\u003e + \u003ch2 id=\u0022the-website\u0022\u003eThe website\u003c\/h2\u003e\n\u003cp\u003eThis website is built with the \u003ca href=\u0022https:\/\/gohugo.io\/\u0022\u003eHUGO\u003c\/a\u003e static website generator using the \u003ca href=\u0022https:\/\/github.com\/lxndrblz\/anatole\u0022\u003eanatole\u003c\/a\u003e theme.\u003cbr\u003e\nThe website\u0026rsquo;s source code is hosted in \u003ca href=\u0022https:\/\/github.com\/Antiz96\/antiz.fr\/\u0022\u003ethis GitHub repository\u003c\/a\u003e.\u003c\/p\u003e\n\u003ch2 id=\u0022automated-ci--cd-workflow\u0022\u003eAutomated CI \/ CD workflow\u003c\/h2\u003e\n\u003cp\u003eI make my changes \u003cem\u003e(e.g. creating an new article, update the theme, add new parameters to the website, etc\u0026hellip;)\u003c\/em\u003e locally on my computer inside the git repository in the \u003ccode\u003edev\u003c\/code\u003e branch.\u003cbr\u003e\nEvery changes I made (e.g. creating a new article, update the theme, add new parameters to the website, \u0026hellip;) are done in my local git repository on the \u003ca href=\u0022https:\/\/github.com\/Antiz96\/antiz.fr\/tree\/dev\u0022\u003e\u003ccode\u003edev\u003c\/code\u003e branch\u003c\/a\u003e.\u003cbr\u003e\nOnce the changes are pushed to the above GitHub repository, I create a pull request from the \u003ccode\u003edev\u003c\/code\u003e branch to the main one, which triggers CI \/ CD pipelines (which run on my own self-hosted runners):\u003c\/p\u003e @@ -212,7 +216,7 @@ , "url" : "https:\/\/antiz.fr\/blog\/website-workflow\/", - "wordCount" : "418", + "wordCount" : "429", "genre" : [ ], "keywords" : [ ] } @@ -432,38 +436,40 @@

The Automated Workflow I Use to Manage This Website

  • - 2-minute read + 3-minute read
  • -

    EDIT: This article is slitghly outdated as the workflow I use to maintain this website has evolved and improved over time. I’ll eventually write a V2 of that article at some point.

    -

    The website

    +

    The website

    This website is built with the HUGO static website generator using the anatole theme.
    The website’s source code is hosted in this GitHub repository.

    -

    Automated workflow

    -

    To manage this website, I use an automated CI / CD workflow:

    +

    Automated CI / CD workflow

    +

    I make my changes (e.g. creating an new article, update the theme, add new parameters to the website, etc…) locally on my computer inside the git repository in the dev branch.
    +Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, …) are done in my local git repository on the dev branch.
    +Once the changes are pushed to the above GitHub repository, I create a pull request from the dev branch to the main one, which triggers CI / CD pipelines (which run on my own self-hosted runners):

    +

    alt_text

    CI

    -

    I make my changes (creating an new article, update the theme, add new parameters to the website, etc…) locally on my computer inside the git repository in the dev branch.
    -Once the changes are done, I push them to the GitHub repository and I create a pull request from the dev branch to the main one, which triggers a CI pipeline:

    -

    alt_text

    -

    This CI pipeline is divided into two jobs:

    -

    alt_text

    +

    The CI pipeline has one “Test” stage which, as the name implies, runs a bunch of tests (e.g. spellcheckers & linters):

    +

    alt_text

    +

    alt_text

    +

    CD

    +

    The CD pipeline has two stages:

    +

    alt_text

    -

    The build job automatically builds the website against the new changes I made and, if the build succeeds, it automatically pushes the built website to the dev branch (and thus, add it to the current merge request).

    +

    The “Build” stage builds the website via hugo and then commits the built changes to my repository (still on the dev branch).

    +

    alt_text

    -

    The test job automatically runs a bunch of tests / linters against the website’s files in the repository, to make sure the changes I made are correctly written / syntaxed.

    -

    CD

    -

    Once both of the above CI jobs succeeded (meaning the website has been successfully built, pushed to the dev branch of the repository, and the tests went through without any error), I launch a job on my Jenkins server targeting the dev environment *(edit: the trigger of that job is now automated via GitHub actions as well):

    -

    alt_text

    -

    This Jenkins job runs a simple Ansible playbook (see that playbook here) that aims to update the website’s sources on the targeted environment against the related GitHub branch (dev branch –> development environment, main branch –> production environment):

    -

    alt_text

    -

    I can then review what my changes on my development environment.

    -

    Once the changes have been reviewed and declared “ready” to go to production, the only thing I need to do is to merge the changes to the main branch on the GitHub repository and relaunch my Jenkins job, targeting the “prod” environment this time, so the changes are pushed against the main branch to the VPS which hosts this website:

    -

    alt_text

    -

    This workflow aims to evolve and be improved over time but it’s a good example of a simple; yet effective, flexible and reliable automated CI / CD workflow you can use to manage your projects! 😄

    +

    Once the “Build” stage has finished successfully, the “Deploy” stage is triggered.

    +

    alt_text

    +

    It allows to automatically deploy the website by remotely triggering the related job on my Jenkins server for my website deployment. This Jenkins job can either target my dev or prod environment (the former being hosted on a virtual server in my homelab, the latter being hosted on a VPS), thanks to a dedicated parameter.

    +

    alt_text

    +

    Under the hood, this Jenkins job runs a simple Ansible playbook (see that playbook here) that aims to update the website’s sources on the targeted environment against the related GitHub branch (dev branch –> development environment, main branch –> production environment).

    +

    When opening a pull request from the dev branch to the main branch, the “Deploy” stage of my GitHub CD pipeline automatically triggers the related Jenkins job (which itself triggers the related Ansible playbook) targeting my dev environment, so my changes gets automatically deployed and I can review them on my development environment.

    +

    Once I reviewed the changes on my development environment and they are ready to go to production, I can just merge the pull request to the main branch which will trigger a new run of the CD pipeline with the “Deploy” stage targeting the prod environment this time!

    +

    This workflow may evolve and be improved over time but it’s a good example of a simple; yet effective, flexible and reliable automated CI / CD workflow you can use to manage your projects! 😄

    diff --git a/public/images/Jenkins_Update_Website_Job_Dev.png b/public/images/Jenkins_Update_Website_Job_Dev.png deleted file mode 100644 index be92590b..00000000 Binary files a/public/images/Jenkins_Update_Website_Job_Dev.png and /dev/null differ diff --git a/public/images/Jenkins_Update_Website_Job_Param.png b/public/images/Jenkins_Update_Website_Job_Param.png deleted file mode 100644 index 29d19b18..00000000 Binary files a/public/images/Jenkins_Update_Website_Job_Param.png and /dev/null differ diff --git a/public/images/Jenkins_Update_Website_Job_Prd.png b/public/images/Jenkins_Update_Website_Job_Prd.png deleted file mode 100644 index 6c003edb..00000000 Binary files a/public/images/Jenkins_Update_Website_Job_Prd.png and /dev/null differ diff --git a/public/images/Website_GitHub_CI_Jobs.png b/public/images/Website_GitHub_CI_Jobs.png deleted file mode 100644 index 9c801829..00000000 Binary files a/public/images/Website_GitHub_CI_Jobs.png and /dev/null differ diff --git a/public/images/Website_GitHub_MR_CI.png b/public/images/Website_GitHub_MR_CI.png deleted file mode 100644 index c4dd34ce..00000000 Binary files a/public/images/Website_GitHub_MR_CI.png and /dev/null differ diff --git a/public/images/alpine_linux-logo.png b/public/images/index/alpine_linux-logo.png similarity index 100% rename from public/images/alpine_linux-logo.png rename to public/images/index/alpine_linux-logo.png diff --git a/public/images/arch_linux-logo.png b/public/images/index/arch_linux-logo.png similarity index 100% rename from public/images/arch_linux-logo.png rename to public/images/index/arch_linux-logo.png diff --git a/public/images/arch_update-logo.png b/public/images/index/arch_update-logo.png similarity index 100% rename from public/images/arch_update-logo.png rename to public/images/index/arch_update-logo.png diff --git a/public/images/ubuntu_unity-logo.png b/public/images/ubuntu_unity-logo.png deleted file mode 100644 index ccac693d..00000000 Binary files a/public/images/ubuntu_unity-logo.png and /dev/null differ diff --git a/public/images/website_workflow/CD_Job.png b/public/images/website_workflow/CD_Job.png new file mode 100644 index 00000000..c5d6224f Binary files /dev/null and b/public/images/website_workflow/CD_Job.png differ diff --git a/public/images/website_workflow/CD_Job_Build_Stage_Steps.png b/public/images/website_workflow/CD_Job_Build_Stage_Steps.png new file mode 100644 index 00000000..7ab062e9 Binary files /dev/null and b/public/images/website_workflow/CD_Job_Build_Stage_Steps.png differ diff --git a/public/images/website_workflow/CD_Job_Deploy_Stage_Steps.png b/public/images/website_workflow/CD_Job_Deploy_Stage_Steps.png new file mode 100644 index 00000000..1b87d511 Binary files /dev/null and b/public/images/website_workflow/CD_Job_Deploy_Stage_Steps.png differ diff --git a/public/images/website_workflow/CI_CD_Jobs.png b/public/images/website_workflow/CI_CD_Jobs.png new file mode 100644 index 00000000..63335d32 Binary files /dev/null and b/public/images/website_workflow/CI_CD_Jobs.png differ diff --git a/public/images/website_workflow/CI_Job.png b/public/images/website_workflow/CI_Job.png new file mode 100644 index 00000000..ad954ebd Binary files /dev/null and b/public/images/website_workflow/CI_Job.png differ diff --git a/public/images/website_workflow/CI_Job_Test_Stage_Steps.png b/public/images/website_workflow/CI_Job_Test_Stage_Steps.png new file mode 100644 index 00000000..354b2cfa Binary files /dev/null and b/public/images/website_workflow/CI_Job_Test_Stage_Steps.png differ diff --git a/public/images/website_workflow/Jenkins_Job_Parameters.png b/public/images/website_workflow/Jenkins_Job_Parameters.png new file mode 100644 index 00000000..506bc41c Binary files /dev/null and b/public/images/website_workflow/Jenkins_Job_Parameters.png differ diff --git a/public/index.html b/public/index.html index 99281c33..81a73a31 100644 --- a/public/index.html +++ b/public/index.html @@ -370,7 +370,7 @@

    Projects

    I contribute to many open source projects and I’m always willing to help, share and learn in the process!
    Here are the main projects I actively contribute to:

    Arch Linux

    -

    alt text

    +

    alt text

    Arch Linux is a lightweight and flexible Linux distribution that focuses on simplicity, modernity, pragmatism, user centrality and versatility.

    Alpine Linux

    -

    alt text

    +

    alt text

    Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.

    Arch-Update

    -

    alt text

    +

    alt text

    Arch-Update is an update notifier & applier for Arch Linux that assists you with important pre / post update tasks.

    It has various features such as a clickeable systay applet & an automated check for update, and is designed to follow usual system maintenance steps, as described in the Arch Wiki:
    It offers to read latest Arch news before updating the system, offers to remove orphan & old cached packages, to process pacnew files, to restart services that need a post upgrade restart, it checks for pending kernel updates requiring a reboot to be applied, etc… It optionally supports AUR & Flatpak packages as well as desktop notifications.

    diff --git a/public/index.xml b/public/index.xml index eabb2002..718990ae 100644 --- a/public/index.xml +++ b/public/index.xml @@ -55,10 +55,13 @@ After a quick thought, I understood that a power outage occurred during the nigh https://antiz.fr/blog/website-workflow/ - <p>EDIT: This article is slitghly outdated as the workflow I use to maintain this website has evolved and improved over time. I&rsquo;ll eventually write a V2 of that article at some point.</p> -<h2 id="the-website">The website</h2> + <h2 id="the-website">The website</h2> <p>This website is built with the <a href="https://gohugo.io/">HUGO</a> static website generator using the <a href="https://github.com/lxndrblz/anatole">anatole</a> theme.<br> -The website&rsquo;s source code is hosted in <a href="https://github.com/Antiz96/antiz.fr/">this GitHub repository</a>.</p> +The website&rsquo;s source code is hosted in <a href="https://github.com/Antiz96/antiz.fr/">this GitHub repository</a>.</p> +<h2 id="automated-ci--cd-workflow">Automated CI / CD workflow</h2> +<p>I make my changes <em>(e.g. creating an new article, update the theme, add new parameters to the website, etc&hellip;)</em> locally on my computer inside the git repository in the <code>dev</code> branch.<br> +Every changes I made (e.g. creating a new article, update the theme, add new parameters to the website, &hellip;) are done in my local git repository on the <a href="https://github.com/Antiz96/antiz.fr/tree/dev"><code>dev</code> branch</a>.<br> +Once the changes are pushed to the above GitHub repository, I create a pull request from the <code>dev</code> branch to the main one, which triggers CI / CD pipelines (which run on my own self-hosted runners):</p>