Added SPDX Identifiers, reformatted Dockerfile
This commit is contained in:
parent
8033fedf18
commit
13393609ec
4 changed files with 14 additions and 12 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
### Vim
|
### Vim
|
||||||
# Swap
|
# Swap
|
||||||
|
|
|
@ -1,16 +1,7 @@
|
||||||
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
|
||||||
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
# 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.
|
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
# Use the official docker image.
|
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
stage: build
|
stage: build
|
||||||
services:
|
services:
|
||||||
|
@ -28,7 +19,12 @@ docker-build:
|
||||||
tag=":$CI_COMMIT_REF_SLUG"
|
tag=":$CI_COMMIT_REF_SLUG"
|
||||||
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
|
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
|
||||||
fi
|
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}"
|
- docker push "$CI_REGISTRY_IMAGE${tag}"
|
||||||
# Run this job in a branch where a Dockerfile exists
|
# Run this job in a branch where a Dockerfile exists
|
||||||
rules:
|
rules:
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
LABEL org.label-schema.schema-version="1.0.0-rc1"
|
LABEL org.label-schema.schema-version="1.0.0-rc1"
|
||||||
|
|
1
LICENSES/CC0-1.0.txt
Symbolic link
1
LICENSES/CC0-1.0.txt
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../LICENSE
|
Loading…
Reference in a new issue