forked from Botanical/BotanJS
		
	Use Concourse CI
This commit is contained in:
		
							
								
								
									
										24
									
								
								concourse/build.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								concourse/build.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					platform: linux
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					image_resource:
 | 
				
			||||||
 | 
					  type: registry-image
 | 
				
			||||||
 | 
					  source:
 | 
				
			||||||
 | 
					    repository: concourse/oci-build-task
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					inputs:
 | 
				
			||||||
 | 
					  - name: project-src
 | 
				
			||||||
 | 
					    path: .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					outputs:
 | 
				
			||||||
 | 
					  - name: image
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					caches:
 | 
				
			||||||
 | 
					  - path: cache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					params:
 | 
				
			||||||
 | 
					  CONTEXT: .
 | 
				
			||||||
 | 
					  # Reference: https://concourse-ci.org/building-an-image-and-using-it-in-a-task.html#build-the-image
 | 
				
			||||||
 | 
					  UNPACK_ROOTFS: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					run:
 | 
				
			||||||
 | 
					  path: build
 | 
				
			||||||
							
								
								
									
										21
									
								
								concourse/prepare-deployment-resources.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								concourse/prepare-deployment-resources.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					platform: linux
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					image_resource:
 | 
				
			||||||
 | 
					  type: registry-image
 | 
				
			||||||
 | 
					  source:
 | 
				
			||||||
 | 
					    repository: alpine
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					inputs:
 | 
				
			||||||
 | 
					  - name: project-src
 | 
				
			||||||
 | 
					    path: .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					outputs:
 | 
				
			||||||
 | 
					  - name: deploy-confs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					run:
 | 
				
			||||||
 | 
					  path: sh
 | 
				
			||||||
 | 
					  args:
 | 
				
			||||||
 | 
					    - -exc
 | 
				
			||||||
 | 
					    - |
 | 
				
			||||||
 | 
					      VERSION=$( cat commit.sha )
 | 
				
			||||||
 | 
					      sed "s/IMAGE_TAG/$VERSION/g" k8s/deployments.yaml >> deploy-confs/prod.yaml
 | 
				
			||||||
@@ -26,7 +26,7 @@ spec:
 | 
				
			|||||||
            mountPath: "/app/cache"
 | 
					            mountPath: "/app/cache"
 | 
				
			||||||
      containers:
 | 
					      containers:
 | 
				
			||||||
        - name: web
 | 
					        - name: web
 | 
				
			||||||
          image: registry.k8s.astropenguin.net/astrojs:2022.04.19
 | 
					          image: registry.k8s.astropenguin.net/astrojs:IMAGE_TAG
 | 
				
			||||||
          securityContext:
 | 
					          securityContext:
 | 
				
			||||||
            runAsGroup: 1001
 | 
					            runAsGroup: 1001
 | 
				
			||||||
            runAsNonRoot: true
 | 
					            runAsNonRoot: true
 | 
				
			||||||
@@ -54,7 +54,7 @@ spec:
 | 
				
			|||||||
        - name: redis
 | 
					        - name: redis
 | 
				
			||||||
          image: redis:6.0.8-alpine
 | 
					          image: redis:6.0.8-alpine
 | 
				
			||||||
        - name: compiler
 | 
					        - name: compiler
 | 
				
			||||||
          image: registry.k8s.astropenguin.net/astrojs:2022.04.19
 | 
					          image: registry.k8s.astropenguin.net/astrojs:IMAGE_TAG
 | 
				
			||||||
          securityContext:
 | 
					          securityContext:
 | 
				
			||||||
            runAsGroup: 1001
 | 
					            runAsGroup: 1001
 | 
				
			||||||
            runAsNonRoot: true
 | 
					            runAsNonRoot: true
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user