Posts

Showing posts with the label CI/CD

Gitlab CI/CD with pipeline, artifacts and environments

Image
Gitlab CI/CD with pipeline, artifacts and environments Almost a year ago I wrote about how we could setup CI/CD with gitlab pipeline . I showed a very simple 3 stages pipeline build/test/deploy. Since then Gitlab has improved considerably their CI tool with features simplifying releases management. Today we will revisit pipelines and introduce few concepts which will help in managing releases. Pipeline Releases Artifacts Environments 1. Pipeline Pipeline are defines as jobs. Each job can be part of a stage in the pipeline and multiple jobs can run concurrently if part of the same stage. The pipeline is define in a .gitlab-ci.yml file placed at the root of the application. We can setup our own runner or use a shared runner from Gitlab. The shared runner runs on Docker therefore it’s possible to build the dotnet image and build our dotnet application. Here is the pipeline we will be using as example pipeline: image : microsoft/dotnet:latest stages: - build - test - pa...

Setup Continuous Integration and Deployment for dotnet library with Appveyor and FAKE

Setup Continuous Integration and Deployment for dotnet library with Appveyor and FAKE Last week we saw a flow to manage versioning and releases . As a continuation of last week, today I will show how we can setup versioning and releases for open source projects by configuring Appveyor and using FAKE to setup a build script. Configure AppVeyor FAKE 1. Configure AppVeyor Configuring AppVeyor is done via a yaml file appveyor.yml at the root of the repository. Then from the site https://www.appveyor.com/ , we can sign in with our GitHub credentials and add the repository to the AppVeyor projects. All the settings in the settings tab can be configured in the yaml file. appveyor.yml settings can be seen in multiple sections: global environment build test artifact deploy The global configuration is where we configure the context of the build, # 1. version: '{build}' image: Visual Studio 2017 skip_branch_with_pr: true skip_commits: files: - docs/**/* - ...

Continuously deploy infrastructure with GitLab Pipeline

Continuously deploy infrastructure with Gitlab Pipeline Few weeks ago we saw how we could Setup continious integration and deployment to deploy an application using Gitlab Pipeline . We configured a service with systemd and had an ASP NET Core application automatically deployed when code was pushed to the repository. This automation allows us to reduce interaction with the server and reducing the manual work. The “infrastructure” configurations like systemd service files and nginx site files must also be created or edited on the server therefore it makes sense to also have them automatically deployed. On top of that, it makes even more sense to have them save in repository and source controlled. Today we will see how we can leverage Gitlab Pipeline to setup a continuous deployment for our infrastructure files in three parts: Setup the repository Setup the runner job Deploy the configurations 1. Setup the repository We start first by creating a repository with the same struct...

Setup a CI/CD pipeline with Gitlab for ASPNET Core on Ubuntu

Setup a CI/CD pipeline with Gitlab for ASPNET Core on Ubuntu Few weeks ago I explained how we could setup a CI/CD pipeline whereby the runner would be on Windows and the last stage was to package the application. Today we will see how we can setup a runner on Ubuntu CI server and use it to build and deploy an ASP MET Core application onto a Ubuntu 16.04 server. This post will be composed by three parts: Setup the runner on the CI server Setup the application on the server Setup the job in our project If you are unfamiliar with Gitlab pipeline and its terminology, you can read my previous post where I explain the main concepts behind GitLab pipeline with runner, jobs and stages . If you are unfamiliar with ssh and systemd, you can read my previous blog post on useful ssh commands and my previous blog post on how to manage Kestrel process with systemd . 1. Setup the runner on the CI server Setup the runner on your CI server by getting the package with apt-get. curl -L https...