Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mat2-ci-images
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
georg
mat2-ci-images
Commits
218ffd22
Verified
Commit
218ffd22
authored
5 years ago
by
georg
Browse files
Options
Downloads
Patches
Plain Diff
CI: Introduce Dockerfile linting
parent
527ea238
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+35
-6
35 additions, 6 deletions
.gitlab-ci.yml
.hadolint.yaml
+5
-0
5 additions, 0 deletions
.hadolint.yaml
fedora
+4
-3
4 additions, 3 deletions
fedora
with
44 additions
and
9 deletions
.gitlab-ci.yml
+
35
−
6
View file @
218ffd22
---
image
:
docker:latest
services
:
-
docker:dind
stages
:
-
lint
-
build
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_HOST
:
tcp://docker:2375
.transform-job-name
:
&transform-job-name
before_script
:
-
CI_JOB_NAME="$(echo $CI_JOB_NAME | cut -d - -f 2)"
-
export CI_JOB_NAME
.lint-dockerfile
:
&lint-dockerfile
image
:
hadolint/hadolint:latest-debian
<<
:
*transform-job-name
script
:
-
hadolint $CI_JOB_NAME
stage
:
lint
.build-docker-image
:
&build-docker-image
image
:
docker:latest
<<
:
*transform-job-name
script
:
# Disable bash history to prevent the $CI_JOB_TOKEN to be recorded and saved
-
unset HISTFILE
...
...
@@ -21,17 +35,32 @@ variables:
-
rm /root/.docker/config.json
stage
:
build
archlinux
:
lint-archlinux
:
<<
:
*lint-dockerfile
lint-debian
:
<<
:
*lint-dockerfile
lint-fedora
:
<<
:
*lint-dockerfile
lint-gentoo
:
<<
:
*lint-dockerfile
lint-linting
:
<<
:
*lint-dockerfile
build-archlinux
:
<<
:
*build-docker-image
debian
:
build-
debian
:
<<
:
*build-docker-image
fedora
:
build-
fedora
:
<<
:
*build-docker-image
gentoo
:
build-
gentoo
:
<<
:
*build-docker-image
linting
:
build-
linting
:
<<
:
*build-docker-image
This diff is collapsed.
Click to expand it.
.hadolint.yaml
0 → 100644
+
5
−
0
View file @
218ffd22
ignored
:
-
DL3006
-
DL3007
-
DL3008
-
DL3013
This diff is collapsed.
Click to expand it.
fedora
+
4
−
3
View file @
218ffd22
FROM fedora
RUN export FEDORA_VERSION=$(rpm -E %fedora) \
RUN FEDORA_VERSION="$(rpm -E %fedora)" \
&& export FEDORA_VERSION \
&& dnf install -y \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$FEDORA_VERSION.noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$FEDORA_VERSION.noarch.rpm \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-
"
$FEDORA_VERSION
"
.noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-
"
$FEDORA_VERSION
"
.noarch.rpm \
&& dnf update -y \
&& dnf install -y \
cairo \
...
...
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