-
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.
Merge pull request #33 from xsf/feature/gitlab-pipeline
Support experiments on GitLab.com
- Loading branch information
Showing
18 changed files
with
90 additions
and
146 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 |
---|---|---|
@@ -1,73 +1,2 @@ | ||
# Python | ||
# https://github.com/github/gitignore/blob/master/Python.gitignore | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Vim | ||
# https://github.com/github/gitignore/blob/master/Global/Vim.gitignore | ||
|
||
[._]*.s[a-w][a-z] | ||
[._]s[a-w][a-z] | ||
*.un~ | ||
Session.vim | ||
.netrwhist | ||
*~ | ||
|
||
*.html | ||
/Makefile | ||
/registrar |
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 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
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,27 @@ | ||
xsltproc ?= xsltproc | ||
xmllint ?= xmllint | ||
OUTDIR ?= registrar | ||
srcs = $(wildcard *.xml) | ||
html = $(patsubst %.xml,$(OUTDIR)/%.html,$(srcs)) | ||
xml = $(patsubst %.xml,$(OUTDIR)/%.xml,$(srcs)) | ||
|
||
all: validate build | ||
|
||
build: $(html) $(xml) | ||
|
||
validate: | ||
$(foreach srcfile,$(srcs),$(xmllint) --nonet --noout --noent --loaddtd --valid "$(srcfile)" > /dev/null && ) true | ||
|
||
$(OUTDIR): | ||
mkdir -p "$@" | ||
|
||
$(html): $(OUTDIR)/%.html: %.xml %.xsl | $(OUTDIR) | ||
$(xsltproc) --stringparam OUTPUT_FILENAME "$@" "$(patsubst %.xml,%.xsl,$<)" "$<" > "$@" | ||
|
||
$(xml): $(OUTDIR)/%.xml: %.xml %-xml.xsl | $(OUTDIR) | ||
$(xsltproc) "$(patsubst %.xml,%-xml.xsl,$<)" "$<" > "$@" | ||
|
||
clean: | ||
rm -rf "$(OUTDIR)" | ||
|
||
.PHONY: all clean validate |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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 |
File renamed without changes.
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
File renamed without changes.