Skip to content
Snippets Groups Projects
Commit 19192e66 authored by Moul's avatar Moul
Browse files

Update CI syntax to latest standard and conventions

Remove second unnecessary login
parent c10b396b
No related branches found
No related tags found
No related merge requests found
test_build_image:
image: docker:git
image: docker:latest
tags:
- docker
- docker
services:
- docker:dind
- docker:dind
script:
- docker build 3.9
- docker build 3.10
......@@ -14,42 +14,41 @@ test_build_image:
- tags
.build_image:
image: docker:git
image: docker:latest
tags:
- docker
- docker
services:
- docker:dind
- docker:dind
script:
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE/$PYTHON_VERSION:$CI_COMMIT_TAG" $PYTHON_VERSION
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
- docker push "$CI_REGISTRY_IMAGE/$PYTHON_VERSION:$CI_COMMIT_TAG"
- docker tag "$CI_REGISTRY_IMAGE/$PYTHON_VERSION:$CI_COMMIT_TAG" "$CI_REGISTRY_IMAGE/$PYTHON_VERSION:latest"
- docker push "$CI_REGISTRY_IMAGE/$PYTHON_VERSION:latest"
only:
- tags
rules:
- if: $CI_COMMIT_TAG
build_3_9:
build:3.9:
extends: .build_image
variables:
PYTHON_VERSION: "3.9"
build_3_10:
build:3.10:
extends: .build_image
variables:
PYTHON_VERSION: "3.10"
build_3_11:
build:3.11:
extends: .build_image
variables:
PYTHON_VERSION: "3.11"
build_3_12:
build:3.12:
extends: .build_image
variables:
PYTHON_VERSION: "3.12"
build_3_13:
build:3.13:
extends: .build_image
variables:
PYTHON_VERSION: "3.13"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment