From a34c13b4379d07577888707565c392f8768bb8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20R=C3=B6sner?= <philipp.roesner@student.uni-halle.de> Date: Tue, 3 Sep 2024 09:05:21 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..73e095f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,23 @@ +image: docker:latest + +services: + - docker:dind + +variables: + # Define the Docker image name using the GitLab CI environment variables + IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + +before_script: + # Login to the GitLab Container Registry + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + +stages: + - build + +build: + stage: build + script: + # Build the Docker image using the Dockerfile + - docker build -t $IMAGE_NAME . + # Push the Docker image to the GitLab Container Registry + - docker push $IMAGE_NAME -- GitLab