Commit 95449221 authored by Spencer Kiy's avatar Spencer Kiy 🥑

Merge branch 'master' of gitlab.triumf.ca:hla/acc

parents 486eef0c 44e485cb
---
cache:
key: "${CI_COMMIT_REF_SLUG}"
include:
- project: 'gitlab/ci/templates'
ref: 'master'
file: 'docker/Build.gitlab-ci.yml'
- project: 'gitlab/ci/templates'
ref: 'master'
file: 'docker/Deploy.gitlab-ci.yml'
stages:
- build
- release
- test
- deploy
build:
stage: build
extends: .docker_build
tags:
- docker-runner
only:
changes:
- Dockerfile
- requirements.txt
deploy:
stage: release
extends: .docker_deploy
tags:
- docker-runner
variables:
DOCKER_DEPLOY_OVERWRITE_OLD_REVISIONS: 1
only:
changes:
- Dockerfile
- requirements.txt
test_acc:
stage: test
image: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}"
tags:
- docker-runner
before_script:
- echo "-- running XML tests --"
script:
- apk update
- apk add python3 libxml2-dev libxslt-dev python3-dev libc-dev gcc git
- export ACCDIR=$(pwd)
- python3 -m venv /env
- /env/bin/pip3 install --upgrade pip
- /env/bin/pip3 install lxml configparser git+https://gitlab.triumf.ca/hla/acc-utilities/accpy.git@v0.0.1#egg=accpy
- /env/bin/python3 -m accpy.xml_validation
- python3 -m accpy.xml_validation
after_script:
- echo "-- finished running XML tests --"
except:
- myrrha-oshelb
master:
stage: deploy
script:
- curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=beta https://gitlab.triumf.ca/api/v4/projects/93/trigger/pipeline
only:
stage: deploy
script:
- curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=beta https://gitlab.triumf.ca/api/v4/projects/93/trigger/pipeline
only:
- master
FROM alpine:3.7
COPY entrypoint.sh /entrypoint.sh
RUN apk add --no-cache python3 libxml2-dev libxslt-dev python3-dev libc-dev gcc git && \
adduser -D acc && \
chmod 755 /entrypoint.sh
USER acc
WORKDIR /home/acc
COPY requirements.txt /home/acc/requirements.txt
RUN python3 -m pip install --user --upgrade pip && \
python3 -m pip install --user -r requirements.txt && \
rm -f requirements.txt
ENTRYPOINT ["/entrypoint.sh"]
CMD ["accpy.xml_validation"]
#!/bin/sh
if [ "$1" = "accpy.xml_validation" ]; then
shift
export ACCDIR=${ACCDIR-$(pwd)}
python3 -m accpy.xml_validation
fi
exec "$@"
lxml==4.6.2
configparser==5.0.1
git+https://gitlab.triumf.ca/hla/acc-utilities/accpy.git@v0.0.1#egg=accpy
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment