first try for ci
This commit is contained in:
		
							parent
							
								
									4a331c18f6
								
							
						
					
					
						commit
						7db126de66
					
				
					 1 changed files with 47 additions and 0 deletions
				
			
		
							
								
								
									
										47
									
								
								.gitlab-ci.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								.gitlab-ci.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,47 @@
 | 
				
			||||||
 | 
					stages:
 | 
				
			||||||
 | 
					  - pages
 | 
				
			||||||
 | 
					  - calendar
 | 
				
			||||||
 | 
					  - deploy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cache:
 | 
				
			||||||
 | 
					  paths:
 | 
				
			||||||
 | 
					    - ~/.cache/pip/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					variables:
 | 
				
			||||||
 | 
					  GIT_SUBMODULE_STRATEGY: recursive
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					build_pages:
 | 
				
			||||||
 | 
					  image: "golang:1.10-alpine3.8"
 | 
				
			||||||
 | 
					  stage: build
 | 
				
			||||||
 | 
					  variables:
 | 
				
			||||||
 | 
					    SHELL: "/bin/sh"
 | 
				
			||||||
 | 
					  script:
 | 
				
			||||||
 | 
					    - apk add --no-cache --upgrade hugo
 | 
				
			||||||
 | 
					    - hugo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					build_calendar:
 | 
				
			||||||
 | 
					  image: "python:3.7-alpine3.8"
 | 
				
			||||||
 | 
					  stage: calendar
 | 
				
			||||||
 | 
					  variables:
 | 
				
			||||||
 | 
					    SHELL: "/bin/sh"
 | 
				
			||||||
 | 
					  script:
 | 
				
			||||||
 | 
					    - apk --no-cache update
 | 
				
			||||||
 | 
					    - pip install -r requirements.txt
 | 
				
			||||||
 | 
					    - python tools/merge_cals.py
 | 
				
			||||||
 | 
					    - upcoming="$(python tools/gen_upcoming.py static/all.ics 14 5|tr '\n' ' ')" && sed -i "s#CALENDAR#$upcoming#g" public/index.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					deploy_staging:
 | 
				
			||||||
 | 
					  image: "alpine:3.8"
 | 
				
			||||||
 | 
					  stage: deploy
 | 
				
			||||||
 | 
					  variables:
 | 
				
			||||||
 | 
					    SHELL: "/bin/sh"
 | 
				
			||||||
 | 
					  script:
 | 
				
			||||||
 | 
					    - echo "deploy all the things..."
 | 
				
			||||||
 | 
					  when: on_success
 | 
				
			||||||
 | 
					  environment:
 | 
				
			||||||
 | 
					    name: staging
 | 
				
			||||||
 | 
					    url: https://staging.berlin.ccc.de/
 | 
				
			||||||
 | 
					  artifacts:
 | 
				
			||||||
 | 
					    paths:
 | 
				
			||||||
 | 
					      - public/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue