Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Dockerfiles
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
Dockerfiles
Commits
993cd4d4
Commit
993cd4d4
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
CI templates.
- Use the containerfiles templates. - The repo was renamed as part of a refactor.
parent
8a902ac3
No related branches found
No related tags found
No related merge requests found
Pipeline
#2395
passed
3 years ago
Stage: build
Stage: deploy
Stage: .post
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+15
-54
15 additions, 54 deletions
.gitlab-ci.yml
with
15 additions
and
54 deletions
.gitlab-ci.yml
+
15
−
54
View file @
993cd4d4
---
include
:
-
project
:
shore/ci-
templates
-
project
:
shore/ci-
stuff
file
:
templates/pre-commit.yml
-
project
:
shore/ci-
templates
-
project
:
shore/ci-
stuff
file
:
templates/notify.yml
stages
:
-
test
-
build
-
deploy
# One day I may want to start tagging release and for that the TAG variable is
# needed, but that would mean releasing ALL of the images when tagging (sort of
# a periodic release). The images are not really related so for now TAG is
# hard-coded to latest.
variables
:
TAG
:
latest
# Job templates:
.build
:
stage
:
build
variables
:
DOCKER_BUILDKIT
:
"
1"
tags
:
&tags
[
ns4.shore.co.il
]
script
:
-
docker build --pull --no-cache --iidfile iid "$CONTEXT"
after_script
:
-
echo "HASH=$(cat iid)" > dot.env
artifacts
:
reports
:
dotenv
:
dot.env
rules
:
&rules
-
if
:
$CI_PIPELINE_SOURCE == "schedule"
-
if
:
$CI_PIPELINE_SOURCE == "push"
changes
:
-
$CONTEXT/*
-
$CONTEXT/**/*
.push
:
stage
:
deploy
tags
:
*tags
script
:
-
docker tag "$HASH" "registry.shore.co.il/$IMAGE:${TAG:-latest}"
-
docker push "registry.shore.co.il/$IMAGE:${TAG:-latest}"
rules
:
*rules
-
project
:
shore/ci-stuff
file
:
templates/containerfiles.yml
# cgit image:
build-cgit
:
extends
:
.build
extends
:
.
container-
build
variables
:
CONTEXT
:
cgit
push-cgit
:
extends
:
.push
extends
:
.
container-
push
variables
:
CONTEXT
:
cgit
IMAGE
:
cgit
...
...
@@ -65,12 +26,12 @@ push-cgit:
# httpd latest image:
build-httpd
:
extends
:
.build
extends
:
.
container-
build
variables
:
CONTEXT
:
httpd/buster
push-httpd
:
extends
:
.push
extends
:
.
container-
push
variables
:
CONTEXT
:
httpd/buster
IMAGE
:
httpd
...
...
@@ -81,7 +42,7 @@ push-httpd:
# httpd buster image:
push-httpd-buster
:
extends
:
.push
extends
:
.
container-
push
variables
:
CONTEXT
:
httpd/buster
IMAGE
:
httpd
...
...
@@ -93,12 +54,12 @@ push-httpd-buster:
# httpd bullseye image:
build-httpd-bullseye
:
extends
:
.build
extends
:
.
container-
build
variables
:
CONTEXT
:
httpd/bullseye
push-httpd-bullseye
:
extends
:
.push
extends
:
.
container-
push
variables
:
CONTEXT
:
httpd/bullseye
IMAGE
:
httpd
...
...
@@ -110,13 +71,13 @@ push-httpd-bullseye:
# sshd image:
build-sshd
:
extends
:
.build
extends
:
.
container-
build
variables
:
CONTEXT
:
sshd
DOCKER_BUILDKIT
:
"
"
push-sshd
:
extends
:
.push
extends
:
.
container-
push
variables
:
CONTEXT
:
sshd
IMAGE
:
sshd
...
...
@@ -127,12 +88,12 @@ push-sshd:
# crond image:
build-crond
:
extends
:
.build
extends
:
.
container-
build
variables
:
CONTEXT
:
crond
push-crond
:
extends
:
.push
extends
:
.
container-
push
variables
:
CONTEXT
:
crond
IMAGE
:
cron
...
...
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