Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CI stuff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shore
CI stuff
Commits
24767f7a
Commit
24767f7a
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Allow setting the working directory.
In the Docker templates.
parent
70e6f84f
No related branches found
No related tags found
No related merge requests found
Pipeline
#2691
passed
3 years ago
Stage: build
Stage: deploy
Stage: .post
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/docker.yml
+7
-0
7 additions, 0 deletions
templates/docker.yml
with
7 additions
and
0 deletions
templates/docker.yml
+
7
−
0
View file @
24767f7a
...
@@ -7,6 +7,7 @@ foo:
...
@@ -7,6 +7,7 @@ foo:
stage
:
.post
stage
:
.post
image
:
&image
registry.shore.co.il/ci-images:docker
image
:
&image
registry.shore.co.il/ci-images:docker
before_script
:
before_script
:
-
&WORKDIR
cd "${WORKDIR:-.}"
-
&TAG
|-
-
&TAG
|-
if [ -n "${CI_COMMIT_TAG:-}" ]
if [ -n "${CI_COMMIT_TAG:-}" ]
then
then
...
@@ -56,6 +57,7 @@ foo:
...
@@ -56,6 +57,7 @@ foo:
COMPOSE_DOCKER_CLI_BUILD
:
"
1"
COMPOSE_DOCKER_CLI_BUILD
:
"
1"
DOCKER_BUILDKIT
:
"
1"
DOCKER_BUILDKIT
:
"
1"
before_script
:
before_script
:
-
*WORKDIR
-
*TAG
-
*TAG
script
:
script
:
-
docker-compose build --no-cache --parallel --pull
-
docker-compose build --no-cache --parallel --pull
...
@@ -67,6 +69,7 @@ foo:
...
@@ -67,6 +69,7 @@ foo:
DOCKER_BUILDKIT
:
"
1"
DOCKER_BUILDKIT
:
"
1"
DOCKER_REGISTRY
:
registry.hub.docker.com/adarnimrod
DOCKER_REGISTRY
:
registry.hub.docker.com/adarnimrod
before_script
:
before_script
:
-
*WORKDIR
-
*TAG
-
*TAG
-
*IMAGE
-
*IMAGE
script
:
&docker-build
script
:
&docker-build
...
@@ -89,6 +92,7 @@ foo:
...
@@ -89,6 +92,7 @@ foo:
DOCKER_BUILDKIT
:
"
1"
DOCKER_BUILDKIT
:
"
1"
DOCKER_REGISTRY
:
registry.shore.co.il
DOCKER_REGISTRY
:
registry.shore.co.il
before_script
:
before_script
:
-
*WORKDIR
-
*TAG
-
*TAG
-
*IMAGE
-
*IMAGE
script
:
*docker-build
script
:
*docker-build
...
@@ -102,6 +106,7 @@ foo:
...
@@ -102,6 +106,7 @@ foo:
COMPOSE_DOCKER_CLI_BUILD
:
"
1"
COMPOSE_DOCKER_CLI_BUILD
:
"
1"
DOCKER_BUILDKIT
:
"
1"
DOCKER_BUILDKIT
:
"
1"
before_script
:
before_script
:
-
*WORKDIR
-
*TAG
-
*TAG
script
:
script
:
-
docker-compose pull --quiet
-
docker-compose pull --quiet
...
@@ -117,6 +122,7 @@ foo:
...
@@ -117,6 +122,7 @@ foo:
-
branches
-
branches
-
tags
-
tags
before_script
:
before_script
:
-
*WORKDIR
-
*TAG
-
*TAG
-
*hub-login
-
*hub-login
script
:
script
:
...
@@ -143,6 +149,7 @@ foo:
...
@@ -143,6 +149,7 @@ foo:
rules
:
rules
:
-
when
:
manual
-
when
:
manual
before_script
:
before_script
:
-
*WORKDIR
-
*TAG
-
*TAG
script
:
script
:
-
docker-compose up --detach --remove-orphans
-
docker-compose up --detach --remove-orphans
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment