forked from cccb-website-team/www
		
	Adjust ci to renaming master to staging, add production branch
This commit is contained in:
		
							parent
							
								
									1731cbf1e4
								
							
						
					
					
						commit
						d01b9a09cc
					
				
					 1 changed files with 27 additions and 1 deletions
				
			
		| 
						 | 
					@ -51,7 +51,7 @@ deploy_staging:
 | 
				
			||||||
    - eval $(ssh-agent -s)
 | 
					    - eval $(ssh-agent -s)
 | 
				
			||||||
    - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
 | 
					    - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
 | 
				
			||||||
    - echo "$PRIVATE_KEY" | ssh-add -
 | 
					    - echo "$PRIVATE_KEY" | ssh-add -
 | 
				
			||||||
    - rsync -e "ssh -l deploy -p 31337" -av public/ 195.54.164.87:s
 | 
					    - rsync -e "ssh -l deploy -p 31337" -av public/ 195.54.164.87:staging/s
 | 
				
			||||||
  when: on_success
 | 
					  when: on_success
 | 
				
			||||||
  environment:
 | 
					  environment:
 | 
				
			||||||
    name: staging
 | 
					    name: staging
 | 
				
			||||||
| 
						 | 
					@ -59,4 +59,30 @@ deploy_staging:
 | 
				
			||||||
  artifacts:
 | 
					  artifacts:
 | 
				
			||||||
    paths:
 | 
					    paths:
 | 
				
			||||||
      - public/
 | 
					      - public/
 | 
				
			||||||
 | 
					  only:
 | 
				
			||||||
 | 
					     - staging
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					deploy_production:
 | 
				
			||||||
 | 
					  image: "alpine:3.8"
 | 
				
			||||||
 | 
					  stage: deploy
 | 
				
			||||||
 | 
					  dependencies: 
 | 
				
			||||||
 | 
					    - build_calendar
 | 
				
			||||||
 | 
					  variables:
 | 
				
			||||||
 | 
					    SHELL: "/bin/sh"
 | 
				
			||||||
 | 
					  script:
 | 
				
			||||||
 | 
					    - apk --no-cache --upgrade add openssh-client rsync
 | 
				
			||||||
 | 
					    - mkdir -p ~/.ssh
 | 
				
			||||||
 | 
					    - eval $(ssh-agent -s)
 | 
				
			||||||
 | 
					    - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
 | 
				
			||||||
 | 
					    - echo "$PRIVATE_KEY" | ssh-add -
 | 
				
			||||||
 | 
					    - rsync -e "ssh -l deploy -p 31337" -av public/ 195.54.164.87:production/s
 | 
				
			||||||
 | 
					  when: on_success
 | 
				
			||||||
 | 
					  environment:
 | 
				
			||||||
 | 
					    name: staging
 | 
				
			||||||
 | 
					    url: https://berlin.ccc.de/
 | 
				
			||||||
 | 
					  artifacts:
 | 
				
			||||||
 | 
					    paths:
 | 
				
			||||||
 | 
					      - public/
 | 
				
			||||||
 | 
					  only:
 | 
				
			||||||
 | 
					     - staging
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue