Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Docker
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
to-be-continuous
Docker
Commits
b10cb509
Commit
b10cb509
authored
1 year ago
by
Guilhem Bonnefille
Committed by
Pierre Smeyers
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
docs: print jobs topic
parent
3b3ebdd1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-docker.yml
+9
-2
9 additions, 2 deletions
templates/gitlab-ci-docker.yml
with
9 additions
and
2 deletions
templates/gitlab-ci-docker.yml
+
9
−
2
View file @
b10cb509
...
...
@@ -725,6 +725,7 @@ docker-hadolint:
script
:
-
autoconfig_hadolint
-
mkdir -p -m 777 reports
-
log_info "Scanning ${DOCKER_FILE}..."
-
dockerfile_hash=$(echo "$DOCKER_FILE" | md5sum | cut -d" " -f1)
# Output in Code Climate format (GitLab integration)
-
hadolint --no-fail -f gitlab_codeclimate $DOCKER_HADOLINT_ARGS $hadolint_config_opts "$DOCKER_FILE" > "reports/docker-hadolint-${dockerfile_hash}.codeclimate.json"
...
...
@@ -862,7 +863,9 @@ docker-healthcheck:
variables
:
GIT_STRATEGY
:
none
stage
:
package-test
script
:
|
script
:
-
log_info "Healthchecking ${DOCKER_SNAPSHOT_IMAGE}..."
-
|
# Test by internal health_check (Recommended way, more info https://docs.docker.com/engine/reference/builder/#healthcheck)
# This looks complicated but you normally don't have to touch this...
function unexpected_error() {
...
...
@@ -928,7 +931,9 @@ docker-trivy:
stage
:
package-test
variables
:
TRIVY_CACHE_DIR
:
"
.trivycache/"
script
:
|
script
:
-
log_info "Scanning vulnerabilities from ${DOCKER_SNAPSHOT_IMAGE}..."
-
|
# cache cleanup is needed when scanning images with the same tags, it does not remove the database
trivy clean --scan-cache || trivy image --clear-cache
export TRIVY_USERNAME=${DOCKER_REGISTRY_SNAPSHOT_USER:-${DOCKER_REGISTRY_USER:-$CI_REGISTRY_USER}}
...
...
@@ -976,6 +981,7 @@ docker-sbom:
name
:
$DOCKER_SBOM_IMAGE
entrypoint
:
[
"
"
]
script
:
-
log_info "Extracting SBOM from ${DOCKER_SNAPSHOT_IMAGE}..."
-
mkdir -p -m 777 reports
-
basename=$(echo "${DOCKER_SNAPSHOT_IMAGE}" | sed 's|[/:]|_|g')
-
/syft scan ${TRACE+-vv} $DOCKER_SNAPSHOT_IMAGE $DOCKER_SBOM_OPTS -o cyclonedx-json=reports/docker-sbom-${basename}.cyclonedx.json
...
...
@@ -1030,6 +1036,7 @@ docker-publish:
fi
-
BUILDTOOL_HOME=${BUILDTOOL_HOME:-$HOME}
# 1: push main image
-
log_info "Copying ${DOCKER_SNAPSHOT_IMAGE} to ${DOCKER_RELEASE_IMAGE}..."
-
skopeo copy --src-authfile "$BUILDTOOL_HOME/skopeo/.docker/src-config.json" --dest-authfile "$BUILDTOOL_HOME/skopeo/.docker/dest-config.json" ${DOCKER_PUBLISH_ARGS} "docker://$DOCKER_SNAPSHOT_IMAGE" "docker://$DOCKER_RELEASE_IMAGE"
-
|
log_info "Well done your image is pushed and can be pulled with: docker pull $DOCKER_RELEASE_IMAGE"
...
...
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