Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Phoronix-test-suite Benchmarking
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container 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
RC Data Science
community-containers
Phoronix-test-suite Benchmarking
Merge requests
!1
Add Gitlab CI/CD config
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add Gitlab CI/CD config
add-gitlab-CI
into
main
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Matthew K Defenderfer
requested to merge
add-gitlab-CI
into
main
10 months ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Add config file to set up Gitlab CI/CD for automatic container building
👍
0
👎
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
2abcd417
1 commit,
10 months ago
1 file
+
30
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
0 → 100644
+
30
−
0
Options
docker-build
:
# Use the official docker image.
image
:
docker:stable
stage
:
build
services
:
-
docker:26.0.1-dind
variables
:
DOCKER_IMAGE_NAME
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
DOCKER_TLS_CERTDIR
:
"
/certs"
before_script
:
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
cache
:
key
:
${CI_COMMIT_REF_SLUG}
paths
:
-
cache/
# All branches are tagged with $DOCKER_IMAGE_NAME (defaults to commit ref slug)
# Default branch is also tagged with `latest`
script
:
-
docker build --cache-from ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG} --pull -t "$DOCKER_IMAGE_NAME" .
-
docker push "$DOCKER_IMAGE_NAME"
-
|
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
docker tag "$DOCKER_IMAGE_NAME" "$CI_REGISTRY_IMAGE:latest"
docker push "$CI_REGISTRY_IMAGE:latest"
fi
# Run this job in a branch where a Dockerfile exists
rules
:
-
if
:
$CI_COMMIT_BRANCH
exists
:
-
Dockerfile
\ No newline at end of file
Loading