-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This pipeline provides us with the packed docker images of the registry.
- Loading branch information
Showing
3 changed files
with
55 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
stages: | ||
- build | ||
- pack | ||
|
||
"build@main": | ||
image: registry.gitlab.com/xsf/docker-images/registry-buildspace/image:0.1.0 | ||
stage: build | ||
script: | ||
- make | ||
rules: | ||
- if: '$CI_COMMIT_REF_NAME =~ /^main$/' | ||
when: always | ||
- when: never | ||
artifacts: | ||
paths: | ||
- registrar/ | ||
expire_in: '1 day' | ||
|
||
"pack@main": | ||
image: docker:19.03.11 | ||
stage: pack | ||
services: | ||
- docker:19.03.11-dind | ||
script: | ||
- 'export IMAGE_REF="${CI_REGISTRY_IMAGE}/packed:main-$(date -Idate)-${CI_COMMIT_SHORT_SHA}"' | ||
- 'export LATEST_REF="${CI_REGISTRY_IMAGE}/packed:main-latest"' | ||
- 'docker build -t "$IMAGE_REF" -f pack-only.Dockerfile .' | ||
- 'docker image tag "$IMAGE_REF" "$LATEST_REF"' | ||
- 'docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY' | ||
- 'docker push "$IMAGE_REF"' | ||
- 'docker push "$LATEST_REF"' | ||
rules: | ||
- if: '$CI_COMMIT_REF_NAME =~ /^main$/' | ||
when: on_success | ||
- when: never | ||
|
||
"build@mr": | ||
image: registry.gitlab.com/xsf/docker-images/registry-buildspace/image:0.1.0 | ||
stage: build | ||
script: | ||
- make | ||
rules: | ||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' | ||
when: always | ||
- when: never | ||
artifacts: | ||
expose_as: "Content" | ||
paths: | ||
- registrar/ | ||
expire_in: '1 day' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM nginx:1-alpine | ||
COPY registrar/ /usr/share/nginx/html/registar/ | ||
RUN sed -ri '/root\s+\/usr\/share\/nginx\/html/s/^(.+)$/\1\nautoindex on;/' /etc/nginx/conf.d/default.conf | ||
|
||
EXPOSE 80 |