Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
Project Templates
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DevOps
Project Templates
Commits
8150e0d0
Commit
8150e0d0
authored
Jul 09, 2019
by
Richard Crosby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(docker): undo multistage builds stuff
parent
536ad421
Pipeline
#18952
passed with stages
in 28 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
gitlab-ci/build-image.yml
gitlab-ci/build-image.yml
+11
-6
No files found.
gitlab-ci/build-image.yml
View file @
8150e0d0
...
...
@@ -25,13 +25,11 @@ build_image:
-
'
if
[
!
-z
"$CI_COMMIT_TAG"
];
then
export
BBK_RUNTIME_ENVIRONMENT=production;
fi'
# Output environment for easier debugging
-
'
echo
BBK_RUNTIME_ENVIRONMENT:
$BBK_RUNTIME_ENVIRONMENT'
-
"
echo
BBK_RUNTIME_ENVIRONMENT:
$BBK_RUNTIME_ENVIRONMENT"
# Build and push image
-
docker pull $CI_REGISTRY_IMAGE:$TAG-builder ||
true
-
docker build --cache-from $CI_REGISTRY_IMAGE:$TAG-builder --tag $CI_REGISTRY_IMAGE:$TAG-builder --target build .
-
docker build --cache-from $CI_REGISTRY_IMAGE:$TAG-builder --tag $CI_REGISTRY_IMAGE:$TAG .
-
docker push $CI_REGISTRY_IMAGE:$TAG-builder
-
docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG ||
true
-
docker build --cache-from $CI_REGISTRY_IMAGE:$TAG --tag $CI_REGISTRY_IMAGE:$TAG --build-arg BBK_RUNTIME_ENVIRONMENT=${BBK_RUNTIME_ENVIRONMENT} --build-arg COMMIT_SHA=$CI_COMMIT_SHORT_SHA .
-
docker push $CI_REGISTRY_IMAGE:$TAG
except
:
refs
:
...
...
@@ -41,4 +39,11 @@ build_image:
-
$CI_COMMIT_MESSAGE =~ /\[ci-release\]/
tags
:
-
docker
cache
:
{}
# skip artifacts and cache download for this job
dependencies
:
[]
cache
:
key
:
$CI_COMMIT_REF_SLUG
paths
:
-
node_modules/
-
cache/Cypress
policy
:
pull
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment