Merge branch 'timestamp-restorer' into 'master'
fix: Copy scripts to docker image before running them See merge request mythic-insight/legendary!53
This commit is contained in:
		
						commit
						efd180a51d
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -42,6 +42,7 @@ build_image_for_commit:
 | 
				
			||||||
    - docker pull $CI_REGISTRY_IMAGE:latest || true
 | 
					    - docker pull $CI_REGISTRY_IMAGE:latest || true
 | 
				
			||||||
    # This enables fast parallel builds
 | 
					    # This enables fast parallel builds
 | 
				
			||||||
    - export DOCKER_BUILDKIT=1
 | 
					    - export DOCKER_BUILDKIT=1
 | 
				
			||||||
 | 
					    - mkdir -p _build/prod
 | 
				
			||||||
    - docker build --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
 | 
					    - docker build --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
 | 
				
			||||||
    # Push the commit SHA tagged version to registry. We will later choose to tag that as stable
 | 
					    # Push the commit SHA tagged version to registry. We will later choose to tag that as stable
 | 
				
			||||||
    #   if everything passes.
 | 
					    #   if everything passes.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,8 +26,9 @@ ADD ./apps/admin/mix.exs /root/app/apps/admin/
 | 
				
			||||||
ADD ./apps/app/mix.exs /root/app/apps/app/
 | 
					ADD ./apps/app/mix.exs /root/app/apps/app/
 | 
				
			||||||
ADD ./apps/content/mix.exs /root/app/apps/content/
 | 
					ADD ./apps/content/mix.exs /root/app/apps/content/
 | 
				
			||||||
ADD ./apps/core/mix.exs /root/app/apps/core/
 | 
					ADD ./apps/core/mix.exs /root/app/apps/core/
 | 
				
			||||||
ADD ./_build/ /root/app/_build/
 | 
					ADD ./_build/${MIX_ENV}/ /root/app/_build/${MIX_ENV}/
 | 
				
			||||||
ADD ./deps/ /root/app/deps/
 | 
					ADD ./deps/ /root/app/deps/
 | 
				
			||||||
 | 
					ADD ./script/ /root/app/script/
 | 
				
			||||||
RUN script/restore-timestamps
 | 
					RUN script/restore-timestamps
 | 
				
			||||||
RUN mix deps.get
 | 
					RUN mix deps.get
 | 
				
			||||||
RUN mix deps.compile
 | 
					RUN mix deps.compile
 | 
				
			||||||
| 
						 | 
					@ -49,7 +50,6 @@ FROM elixir1
 | 
				
			||||||
ADD ./apps /root/app/apps
 | 
					ADD ./apps /root/app/apps
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Resume compilation of the elixir app
 | 
					# Resume compilation of the elixir app
 | 
				
			||||||
ADD ./script /root/app/script
 | 
					 | 
				
			||||||
RUN MAKE=cmake mix compile
 | 
					RUN MAKE=cmake mix compile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Copy in the built assets & fingerprint them
 | 
					# Copy in the built assets & fingerprint them
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue