Don't push test image to repository anymore
This commit is contained in:
		
							parent
							
								
									b1db27cd59
								
							
						
					
					
						commit
						afb3b96834
					
				@ -11,32 +11,24 @@ services:
 | 
				
			|||||||
  - docker:dind
 | 
					  - docker:dind
 | 
				
			||||||
 | 
					
 | 
				
			||||||
stages:
 | 
					stages:
 | 
				
			||||||
  - build
 | 
					 | 
				
			||||||
  - test
 | 
					  - test
 | 
				
			||||||
  - cleanup
 | 
					 | 
				
			||||||
  - deploy
 | 
					  - deploy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
before_script:
 | 
					before_script:
 | 
				
			||||||
  - docker info
 | 
					  - docker info
 | 
				
			||||||
  - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
 | 
					  - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
 | 
				
			||||||
 | 
					
 | 
				
			||||||
build:
 | 
					 | 
				
			||||||
  stage: build
 | 
					 | 
				
			||||||
  script:
 | 
					 | 
				
			||||||
    - docker build -t $IMAGE_NAME .
 | 
					 | 
				
			||||||
    - docker push $IMAGE_NAME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
test:
 | 
					test:
 | 
				
			||||||
  stage: test
 | 
					  stage: test
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - docker pull $IMAGE_NAME
 | 
					    - docker build -t $IMAGE_NAME .
 | 
				
			||||||
    - docker run -v `pwd`:/git $IMAGE_NAME /bin/sh -c "wget -qO- https://fedoraproject.org/static/hotspot.txt | grep OK && cd /git && hugo"
 | 
					    - docker run -v `pwd`:/git $IMAGE_NAME /bin/sh -c "wget -qO- https://fedoraproject.org/static/hotspot.txt | grep OK && cd /git && hugo"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
deploy:
 | 
					deploy:
 | 
				
			||||||
  stage: deploy
 | 
					  stage: deploy
 | 
				
			||||||
  script:
 | 
					  script:
 | 
				
			||||||
    - docker pull $IMAGE_NAME
 | 
					    - docker build -t $IMAGE_NAME -t $IMAGE_LATEST .
 | 
				
			||||||
    - docker tag $IMAGE_NAME $IMAGE_LATEST
 | 
					    - docker push $IMAGE_NAME
 | 
				
			||||||
    - docker push $IMAGE_LATEST
 | 
					    - docker push $IMAGE_LATEST
 | 
				
			||||||
  only:
 | 
					  only:
 | 
				
			||||||
    - tags
 | 
					    - tags
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user