Pipelines: https://gitlab.com/charoleizer/delphi-gitlab-ci-sample/pipelines
- Windows 10 v1089 as Host;
- Delphi CE;
- .NET Framework v3.5;
- Docker Desktop 2.1.0.0 ;
- Gitlab-Runner with Docker-Windows executor and .NET 3.5 image;
- Sonarqube 5.6.7 ;
- Sonar-Scanner 3.2 ;
- JFrog Artifactory OSS;
- Portainer;
- .NET Framework: mcr.microsoft.com/dotnet/framework/runtime:3.5 (Windows)
- Sonarqube with Delphi Plugin: charoleizer/sonarqube-delphi-5.6.7-alpine
- JFrog Artifactory OSS: docker.bintray.io/jfrog/artifactory-oss
- Portainer: portainer/portainer (Optional)
- Download gitlab runner for Windows, register, install and start as service. [?];
- It will create 2 Runners container, one for cache and another for build
- Switch to Windows Containers on Docker Desktop.
- Pull the .NET Framework image. This image will be used to create a container from Build Runner. [?];
- Bind the Delphi ./bin directory (C:\Program Files (x86)\Embarcadero\Studio\17.0\bin) with Build Runner Container.
- Download Sonar-Scanner 3.2 and bind the scanner path with Build Runner Container. [?]
- Switch to Linux Containers on Docker Desktop.
- Create a Linux-Container with Sonarqube. This container use SandroLuck's Plugin. [?]
- Sonar Scanner need a property file to analyse the code. [?]
- Create a Linux-Container with Artifactory OSS. [?]
- Switch to Windows Containers on Docker Desktop.
- To know more about this file, read it.
- Take a look at the full .gitlab-ci.yml file
- Build the test project with MSBuild;
- Run the Test binary output;
- Save the result file for future coverage;
- Run the sonar-scanner using sonar-project.properties configurations;
- Build the project with MSBuild;
- Deploy the artifact temporarily;
- Take the build stage artifact, and compress it;
- Set JFrog Artifactory OSS variables;
- Upload the artifact by Artifactory rest API;
- Because Gitlab-CE and Gitlab-CI are free self-hosted tools. Maybe Github Actions can change it. Waiting for Self-Hosted option.
- Because github is the most famous repository and has a larger community
- Because of Embarcadero's license