Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
workflow:
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Expand All @@ -11,8 +11,8 @@ lint-markdown:
stage: build
image: node:lts
script:
- npm install -g markdownlint-cli
- markdownlint "**/*.md"
- npm install -g markdownlint-cli2
- markdownlint-cli2 "**/*.md"

lint-yaml:
stage: build
Expand Down
8 changes: 0 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,3 @@ Check Markdown files:
```bash
docker run --rm -v "$(pwd)":/workdir davidanson/markdownlint-cli2 "**/*.md"
```

Reproduce locally GitLab jobs:

```bash
mkdir -p .gitlab/runner/local
docker run --rm --name gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/.gitlab/runner/local/config:/etc/gitlab-runner -v $PWD:$PWD --workdir $PWD gitlab/gitlab-runner exec docker lint-markdown
docker run --rm --name gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/.gitlab/runner/local/config:/etc/gitlab-runner -v $PWD:$PWD --workdir $PWD gitlab/gitlab-runner exec docker lint-yaml
```
2 changes: 1 addition & 1 deletion docs/fundamentals/standards/glossary.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Glossary
# Glossary

## IT

Expand Down
100 changes: 100 additions & 0 deletions docs/guides/learning-paths/code-pipelines/bamboo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Bamboo Data Center

## Introduction

> Bamboo Data Center is a continuous delivery pipeline that offers resilience, reliability, and scalibility for teams of any size.

[atlassian.com/software/bamboo](https://www.atlassian.com/software/bamboo)

## Setup

### Build the custom image

Create `.bamboo/server/Dockerfile` file:

```Dockerfile
# starts from the base image provided by Atlassian: https://hub.docker.com/r/atlassian/bamboo-server (7.2.2 based on Ubuntu 20.04.1 LTS, codename focal)
FROM atlassian/bamboo-server:7.2.2

# switches to root user for admin commands
USER root

# installs system requirements
RUN apt-get update
RUN apt-get install -y apt-transport-https \
ca-certificates \
wget \
curl \
gnupg-agent \
software-properties-common
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb
RUN apt-get update

# installs Docker: https://docs.docker.com/engine/install/ubuntu/
RUN apt-get install -y docker-ce \
docker-ce-cli \
containerd.io
RUN usermod -a -G docker bamboo

# installs .NET SDK LTS: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu
RUN apt-get install -y dotnet-sdk-3.1
RUN apt-get install -y dotnet-sdk-5.0

# switches back to bamboo user
USER bamboo

# updates image entrypoint with commands that can only be ran when the container starts
RUN echo "chown root:docker /var/run/docker.sock" >> /entrypoint.sh
```

```bash
# creates a new image
docker build . -t devprofr/bamboo-server -f .bamboo/server/Dockerfile --no-cache
```

### Run the custom image

```bash
docker volume create --name bambooVolume

# for Linux
docker run -v /var/run/docker.sock:/var/run/docker.sock -v bambooVolume:/var/atlassian/application-data/bamboo --name="bamboo" --init -d -p 54663:54663 -p 8085:8085 devprofr/bamboo-server

# for Windows
docker run -v //var/run/docker.sock:/var/run/docker.sock -v bambooVolume:/var/atlassian/application-data/bamboo --name="bamboo" --init -d -p 54663:54663 -p 8085:8085 devprofr/bamboo-server
```

### Configuration

Open [localhost:8085](http://localhost:8085/)

#### Set server capabilities

_Limitation 2021-02-28_: Unfortunately it is not possible to automate it through an API call

You have to manually go to this page ["Bamboo administration > Server capabilities"](http://localhost:8085/admin/agent/configureSharedLocalCapabilities.action) and set the server capabilities (if not present), it must be done only once/

Category | Executable / Label | Path | Bamboo key
-----------|--------------------|-------------------|--------------------------------
Executable | dotnet | `/usr/bin/dotnet` | `system.builder.command.dotnet`
Docker | Docker | `/usr/bin/docker` | `system.docker.executable`

### Troubleshooting

```bash
docker exec -it bamboo sh
docker exec -u 0 -it bamboo bash
```

### Clean-up

```bash
docker stop bamboo
docker rm bamboo
```
44 changes: 44 additions & 0 deletions docs/guides/learning-paths/code-pipelines/bitbucket-cloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Bitbucket (Cloud)

## Introduction

> Bitbucket is more than just Git code management.
> Bitbucket gives teams one place to plan projects, collaborate on code, test, and deploy.

[bitbucket.org/product](https://bitbucket.org/product/)

## Setup

Create a file `bitbucket-pipelines.yml`:

```yml
image: mcr.microsoft.com/dotnet/sdk:5.0

pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- dotnetcore
script:
- REPORTS_PATH=./test-reports/build_${BITBUCKET_BUILD_NUMBER}
- cd samples/dotnet
- dotnet restore
- dotnet build --no-restore --configuration Release
- dotnet test --no-build --configuration Release --test-adapter-path:. --logger:"junit;LogFilePath=$REPORTS_PATH/junit.xml"
- step:
name: Lint the code
caches:
- dotnetcore
script:
- export SOLUTION_NAME=Devpro.CIToolsDemo
- export REPORTS_PATH=linter-reports
- cd samples/dotnet
- dotnet new tool-manifest
- dotnet tool install JetBrains.ReSharper.GlobalTools --version 2021.1.0-eap02
- dotnet tool restore
- dotnet jb inspectcode ${SOLUTION_NAME}.sln --output="${REPORTS_PATH}/jb-${BITBUCKET_BUILD_NUMBER}.xml"
artifacts:
- linter-reports/**
```
15 changes: 15 additions & 0 deletions docs/guides/learning-paths/code-pipelines/code-pipelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Code pipelines

Let's explore different tools to implement CI pipelines!

## Platforms

Platform | Typology
--------------------------------------|------------------------
Azure DevOps | Cloud
[Bamboo Data Center](bamboo.md) | Self-hosted (container)
[Bitbucket Cloud](bitbucket-cloud.md) | Cloud
[Concourse](concourse.md) | Self-hosted (container)
GitHub | Cloud
GitLab | Cloud
[TeamCity Professional](teamcity.md) | Self-hosted (container)
62 changes: 62 additions & 0 deletions docs/guides/learning-paths/code-pipelines/concourse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Concourse samples

Comprehensive samples to quickly get up to speed with [Concourse](../../../organizations/communities/concourse/concourse.md).

## Requirements

* Have an account to a running Concourse instance
* For the first time, you can use the local containers with `docker compose -f samples/concourse/compose.yml up -d`
* You can also deploy it in a Kubernetes cluster with [Helm chart](https://github.com/devpro/helm-charts/tree/feature/concourse/charts/concourse)
* Ultimately, you can run it on a [VM](https://github.com/devpro/information-technology-guide/blob/main/docs/communities/concourse/ubuntu-install.md)

* Have `fly` executable on the machine running the command lines (careful with the version that needs to match the one from Concourse instance)
* Grab it from the [releases GitHub page](https://github.com/concourse/concourse/releases) or from the running Concourse web page

## Samples

### Login

```bash
fly --target localhost login --concourse-url http://localhost:8080/
```

### Pipelines

* Hello world

Login on localhost:

```bash
fly --target localhost set-pipeline --pipeline helloworld --config samples/concourse/tasks/basic/01_helloworld.yml

# enables the pipeline and run it (can also be done from http://localhost:8080/teams/main/pipelines/helloworld, click on play symbol then on + symbol)
fly -t localhost unpause-pipeline -p helloworld
fly -t localhost trigger-job -j helloworld/job
```

* .NET

```bash
fly --target localhost set-pipeline --pipeline aspnetcore --config samples/concourse/tasks/dotnet/01_aspnetcore.yml

fly -t localhost unpause-pipeline -p aspnetcore

fly -t localhost trigger-job -j aspnetcore/build-webapp

fly --target localhost set-pipeline --pipeline dotnetglobaltool --config pipelines/dotnetcore/02_globaltool.yml --var mdbatlas-publickey=xxxx --var mdbatlas-publickey=yyyy -var almops-token=zzz --var almops-org=xxxx -var almops-user=yyyy -var almops-token=zzz

fly -t localhost unpause-pipeline -p dotnetglobaltool

fly -t localhost trigger-job -j dotnetglobaltool/mongodb-atlas -w
fly -t localhost trigger-job -j dotnetglobaltool/azure-devops -w
```

### Tasks

* Hello world

```bash
fly --target localhost login --concourse-url http://localhost:8080/

fly -t localhost execute --config samples/concourse/tasks/basic/helloworld.yml
```
57 changes: 57 additions & 0 deletions docs/guides/learning-paths/code-pipelines/teamcity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# TeamCity

In this tutorial we'll setup an instance of TeamCity, running on Docker, and configure a CI pipeline on the code samples available in this repository.

## Setup

### Create local folders

```bash
# creates local folders to store TeamCity run files
md data logs agent
md agent/conf
```

### Run TeamCity server in a container

```bash
# starts the container
docker run -it --name teamcity-server -v $PWD/data:/data/teamcity_server/datadir -v $PWD/logs:/opt/teamcity/logs -p 8111:8111 jetbrains/teamcity-server

# if stopped, starts again the container
docker start teamcity-server
```

### Run TeamCity agent in a container

#### Use the Docker image

```bash
docker run -it --name teamcity-agent -e SERVER_URL="http://teamcity-server:8111" -v $PWD/agent/conf:/data/teamcity_agent/conf --link teamcity-server jetbrains/teamcity-agent
```

→ [hub.docker.com](https://hub.docker.com/r/jetbrains/teamcity-agent/)

#### Use a custom image

The default image may not contain all the needed tools for the pipeline to run.

TODO

### Clean-up

```bash
docker rm teamcity-server teamcity-agent
```

## Configuration

### First TeamCity configuration

* Open [localhost:8111](http://localhost:8111)
* Log-in with empty username and the token shown in the container log file
* Go to the "Administration" section and click on "Users" to create a new user account (make sure to give the super administrative privilege)
* Authorize the agent [localhost:8111/agents](http://localhost:8111/agents.html?tab=unauthorizedAgents)
* Go to the "Projects" section and create a new project (use `https://github.com/devpro/ci-pipeline-samples` as repository URL)
* Use "Auto-detected Build Steps" to have TeamCity review what is needed (you can select everything except the NuGet and msbuild step)
* Review steps and step names and start a new build
3 changes: 2 additions & 1 deletion docs/guides/workstations/ubuntu/ubuntu.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ubuntu
# Ubuntu

The following instructions target **Ubuntu 24.04**.
For previous instructions: [Ubuntu 20.04](archive/ubuntu-20_04.md).
Expand All @@ -10,6 +10,7 @@ For previous instructions: [Ubuntu 20.04](archive/ubuntu-20_04.md).
```bash
sudo apt update
sudo apt -y upgrade
sudo apt autoremove
```

## Packages
Expand Down
11 changes: 5 additions & 6 deletions docs/guides/workstations/windows/windows.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Windows
# Windows

The following instructions target **Windows 11**.
For previous versions: [Windows 10](archive/windows-10.md).
Expand Down Expand Up @@ -29,8 +29,7 @@ For previous versions: [Windows 10](archive/windows-10.md).

### Utilities

- KeePass
- Plugins: [KeeTheme](https://github.com/xatupal/KeeTheme) (dark theme)
- Password manager: 1Password, or KeePass (with [KeeTheme](https://github.com/xatupal/KeeTheme)) for example
- WinDirStat

```batch
Expand All @@ -48,9 +47,9 @@ For previous versions: [Windows 10](archive/windows-10.md).
1. [Visual Studio Code](../../../organizations/companies/microsoft/vscode.md)
2. Git
3. Notepad++
4. [MongoDB Compass](https://www.mongodb.com/try/download/compass)
5. [Visual Studio 2022](../../../organizations/companies/microsoft/vs2022.md) or [Rider](https://www.jetbrains.com/rider/)
6. [WebStorm](https://www.jetbrains.com/webstorm/)
4. [MongoDB Compass](../../../organizations/companies/mongodb/compass.md)
5. [Rider](../../../organizations/companies/jetbrains/rider.md) or [Visual Studio 2026](../../../organizations/companies/microsoft/vs2026.md)
6. [WebStorm](../../../organizations/companies/jetbrains/webstorm.md)

### Office

Expand Down
4 changes: 2 additions & 2 deletions docs/organizations/companies/armis/armis.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Armis
# Armis

[armis.com](https://www.armis.com/)
🌐 [armis.com](https://www.armis.com/)
4 changes: 2 additions & 2 deletions docs/organizations/companies/armorcode/armorcode.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# ArmorCode
# ArmorCode

[armorcode.com](https://www.armorcode.com/)
🌐 [armorcode.com](https://www.armorcode.com/)
4 changes: 2 additions & 2 deletions docs/organizations/companies/checkpoint/checkpoint.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Check Point
# Check Point

[checkpoint.com](https://www.checkpoint.com/)
🌐 [checkpoint.com](https://www.checkpoint.com/)

## Check Point CloudGuard

Expand Down
4 changes: 2 additions & 2 deletions docs/organizations/companies/crowdstrike/crowdstrike.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# CrowdStrike
# CrowdStrike

[crowdstrike.com](https://www.crowdstrike.com/)
🌐 [crowdstrike.com](https://www.crowdstrike.com/)
2 changes: 1 addition & 1 deletion docs/organizations/companies/cyscale/cyscale.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Cyscale

[cyscale.com](https://cyscale.com/)
🌐 [cyscale.com](https://cyscale.com/)
Loading
Loading