Skip to content
Snippets Groups Projects
Commit 7f3e06e1 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

CI: add some tests

So we can test the commands locally the filenames and the
"bin" commands have to match, so remove the file extensions.
parent 151c61da
No related branches found
No related tags found
No related merge requests found
Pipeline #113501 passed
image: registry.gitlab.tugraz.at/dbp/esign/signature/main:v1
image: registry.gitlab.tugraz.at/dbp/cli/main:v1
stages:
- test
- deploy
test-bundle:
stage: test
script:
- ./bin/cli show-bundle-names --vendor=myvendor --category=mycategory --unique-name=greenlight --friendly-name="Electronic Covid Access Permits" --example-entity=Permit
- ./bin/cli generate-bundle --vendor=myvendor --category=mycategory --unique-name=greenlight --friendly-name="Electronic Covid Access Permits" --example-entity=Permit
publish:
stage: deploy
only:
......
FROM debian:bullseye
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& rm -rf /var/lib/apt/lists/*
# Basics
RUN apt-get update && apt-get install -y \
nodejs \
sudo \
curl \
lsb-release \
git \
php \
php-curl \
php-soap \
php-xml \
php-ldap \
php-zip \
php-gmp \
php-gd \
php-mbstring \
&& rm -rf /var/lib/apt/lists/*
# Add a normal user and enable sudo
RUN useradd -u 1000 -ms /bin/bash user
RUN echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER user
WORKDIR /home/user
\ No newline at end of file
* In case of an incompatible change increase the tag version number in build.sh
* ./build.sh
* (first time) sudo docker login registry.gitlab.tugraz.at
* sudo docker push registry.gitlab.tugraz.at/dbp/cli/main:v1
#!/bin/bash
set -e
TAG="registry.gitlab.tugraz.at/dbp/cli/main:v1"
sudo docker build --tag "${TAG}" --file "Dockerfile" .
sudo docker run --rm --security-opt label=disable \
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash
echo "Now run: sudo docker push '$TAG'"
File moved
File moved
......@@ -4,8 +4,8 @@
"description": "CLI to manage DBP frontend applications and Symfony bundles",
"license": "LGPL-2.1-or-later",
"bin": {
"cli": "bin/cli.sh",
"bundle-generator": "bin/bundle-generator.php"
"cli": "bin/cli",
"bundle-generator": "bin/bundle-generator"
},
"repository": {
"type": "git",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment