Skip to content
Snippets Groups Projects

Tut01 - test new pipeline variante

Closed Yana Kernerman requested to merge s92604/devops-webservice:tut01 into main
1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
+ 5
5
@@ -45,11 +45,11 @@ job_build_and_publish_image:
dependencies:
- job_build_artifact
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" # Log in to the container registry
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
script:
- echo "Publishing artifact..."
- ls -al
- docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
- ls -al
- docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
after_script:
- docker rmi "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" # Clean up the image to free up space
- docker rmi "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
\ No newline at end of file
Loading