Build gitlab pipeline

Ukončen Zveřejněno před 2 lety K zaplacení v momentě doručení
Ukončen K zaplacení v momentě doručení

create a pipeline for building and releasing a Docker image using GitLab Cl with

predefined variables. It contains all necessary variables to build, tag and push the image. Your pipeline

should include two stages executed in the following order:

build - executed for each commit. It should include the following steps:

1. pull the latest version of a Docker image from the GitLab Cl registry;

2. use it as a cache to build a new image with two tags: commit's short SHA and latest;

3. push to the GitLab Cl registry an image with commit's short SHA tag;

4. push to the GitLab Cl registry an image with the latest tag.

release - executed only when commit has been tagged. It should do the following:

1. pull a Docker image referring to commit's short SHA;

2. tag it with a value from a Git commit tag;

3. push it to the GitLab Cl registry.

Be sure to define commands in the exact order as described above.

To use Docker in the GitLab Cl you will need to set up the DinD (Docker in Docker) service for both stages.

Use a default section which will:

• define a tIs connection to tep://docker : 2376 using certificates located in the /cert directory;

setup the DinD service in version 19.03.1;

use the docker image in version 19.03.1;

use the before script command to log into the GitLab Cl registry in a non-interactive way.

The repository structure looks like this:

tree

- ?

app

init

app. py

_• PY

•git

•gitlab-ci-yml

[login to view URL]

Dockerfile

30

GitLab Docker

Identifikační číslo projektu: #32763296

O projektu

3 nabídek Projekt na dálku Aktivní před 2 lety