Added SPDX Identifiers, reformatted Dockerfile

This commit is contained in:
Tobias Schmidl 2023-01-13 19:02:59 +01:00
parent 8033fedf18
commit 13393609ec
4 changed files with 14 additions and 12 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
# SPDX-License-Identifier: CC0-1.0
### Vim
# Swap

View file

@ -1,16 +1,7 @@
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Docker.gitlab-ci.yml
# Build a Docker image with CI/CD and push to the GitLab registry.
# Docker-in-Docker documentation: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html
#
# This template uses one generic job with conditional builds
# for the default branch and all other (MR) branches.
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
# SPDX-License-Identifier: CC0-1.0
docker-build:
# Use the official docker image.
image: docker:latest
stage: build
services:
@ -28,7 +19,12 @@ docker-build:
tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
- docker build --pull --label org.label-schema.build-date=$(date -u +'%FT%H:%M:%SZ') --label org.label-schema.name="${NAME}" --label org.label-schema.vcs-url="${CI_PROJECT_URL}" --label org.label-schema.vcs-ref="${CI_COMMIT_SHA:0:8}" -t "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_NAME}:${CI_COMMIT_SHA:0:8}" -t "$CI_REGISTRY_IMAGE${tag}" .
- |
docker build --pull \
--label org.label-schema.build-date=$(date -u +'%FT%H:%M:%SZ') \
--label org.label-schema.name="${NAME}" --label org.label-schema.vcs-url="${CI_PROJECT_URL}" \
--label org.label-schema.vcs-ref="${CI_COMMIT_SHA:0:8}" \
-t "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_NAME}:${CI_COMMIT_SHA:0:8}" -t "$CI_REGISTRY_IMAGE${tag}" .
- docker push "$CI_REGISTRY_IMAGE${tag}"
# Run this job in a branch where a Dockerfile exists
rules:

View file

@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
# SPDX-License-Identifier: CC0-1.0
FROM alpine
LABEL org.label-schema.schema-version="1.0.0-rc1"

1
LICENSES/CC0-1.0.txt Symbolic link
View file

@ -0,0 +1 @@
../LICENSE