Online | Automating Devops With Gitlab Ci/cd Pipelines Read
build: stage: build-image image: docker:20.10.16 services: - docker:20.10.16-dind script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker build -t $IMAGE_TAG . - docker push $IMAGE_TAG only: - main
(set in GitLab UI → Settings → CI/CD → Variables) can be masked or protected for specific branches. 3.2 Conditional Logic with rules The only/except keywords are deprecated in favor of rules . automating devops with gitlab ci/cd pipelines read online
GitLab then shows a dashboard of deployments, and you can roll back from the UI. For secure cluster access, use the GitLab Agent instead of storing kubeconfig . build: stage: build-image image: docker:20