Commit 89545565 authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

CT-147: push the image during the pipeline build stage.

Tag the image with the SHA git when on dev branch.
parent 1c9b3b95
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ build:csp-lmc-mid_pkg:
  only: [master]

#
# Build csp-lmc-mid image 
# Build and push csp-lmc-mid image 
#
build:csp-lmc-mid_image:
  image: nexus.engageska-portugal.pt/ska-docker/tango-builder:latest
@@ -51,6 +51,7 @@ build:csp-lmc-mid_image:
  script:
    - cd $BUILD_PATH      
    - make build
    - make push
  variables:
    BUILD_PATH: csp-lmc-mid

@@ -210,5 +211,9 @@ release csp-lmc-mid image:
  script:
    - cd $BUILD_PATH      
    - make push
  when: manual
  only:
    refs:
      - master
  variables:
    BUILD_PATH: csp-lmc-mid
+7 −1
Original line number Diff line number Diff line
@@ -80,7 +80,13 @@ release: check-status check-release build push
push: pre-push do-push post-push  ## push the image to the Docker registry

do-push:
	docker push $(IMAGE):$(BASE_RELEASE)
	@BRANCH_NAME=`git rev-parse --abbrev-ref HEAD`; \
	echo "--- $$BRANCH_NAME"; \
	if [ $$BRANCH_NAME == "master" ]; then \
	docker push $(IMAGE):$(BASE_RELEASE); \
	else \
	docker push $(IMAGE):$(VERSION); \
	fi
#	docker push $(IMAGE):latest

snapshot: build push
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ csplmc:
  image:
    registry: nexus.engageska-portugal.pt/ska-docker
    image: mid-csp-lmc
    tag: 0.6.9
    tag: 0.6.9-1c9b3b9
    pullPolicy: IfNotPresent

deviceServers: