Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
analytics-engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Polaris
analytics-engine
Commits
a984fae7
Commit
a984fae7
authored
4 months ago
by
Benjamin Ledel
Browse files
Options
Downloads
Patches
Plain Diff
Update file .gitlab-ci.yml
parent
637ec12a
No related branches found
No related tags found
No related merge requests found
Pipeline
#1574998
failed
4 months ago
Stage: build
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+20
-12
20 additions, 12 deletions
.gitlab-ci.yml
with
20 additions
and
12 deletions
.gitlab-ci.yml
+
20
−
12
View file @
a984fae7
...
@@ -8,6 +8,9 @@ scheduler-docker-build:
...
@@ -8,6 +8,9 @@ scheduler-docker-build:
# Use the official docker image.
# Use the official docker image.
image
:
docker:latest
image
:
docker:latest
stage
:
build
stage
:
build
only
:
-
main
-
tags
variables
:
variables
:
DOCKER_HOST
:
tcp://docker:2375
DOCKER_HOST
:
tcp://docker:2375
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
...
@@ -19,18 +22,23 @@ scheduler-docker-build:
...
@@ -19,18 +22,23 @@ scheduler-docker-build:
# Default branch leaves tag empty (= latest tag)
# Default branch leaves tag empty (= latest tag)
# All other branches are tagged with the escaped branch name (commit ref slug)
# All other branches are tagged with the escaped branch name (commit ref slug)
script
:
script
:
-
|
-
|
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
tag=""
tag="latest"
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
else
elif [[ -n "$CI_COMMIT_TAG" ]]; then
tag=":$CI_COMMIT_REF_SLUG"
tag="$CI_COMMIT_TAG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
echo "Running on tag '$CI_COMMIT_TAG': tag = $tag"
fi
else
# Build frontend Docker Container
tag="$CI_COMMIT_REF_SLUG"
-
mv ./scheduler/.production.env ./scheduler/.env
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
-
docker build --pull -t "$CI_REGISTRY_IMAGE${tag}/scheduler" ./scheduler
fi
-
docker push "$CI_REGISTRY_IMAGE${tag}/scheduler"
image_name="$CI_REGISTRY_IMAGE/scheduler:$tag"
echo "Docker image name is: $image_name"
-
mv ./scheduler/.production.env ./scheduler/.env
-
docker build --pull -t "$image_name" ./src
-
docker push "$image_name"
deploy
:
deploy
:
stage
:
deploy
stage
:
deploy
...
...
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