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

Add GitLab CI integration

parent a0950ad9
No related branches found
No related tags found
No related merge requests found
Pipeline #12090 failed
image: registry.gitlab.tugraz.at/vpu/webcomponents/toolkit/main:v6
stages:
- test
test:
stage: test
script:
- npm install
- npm run bootstrap
- npm run test
FROM debian:buster
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
# https://github.com/karma-runner/karma-firefox-launcher/issues/104
ENV MOZ_FORCE_DISABLE_E10S true
RUN apt-get update && apt-get install -y \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
nodejs \
chromium \
# libgbm1: newer chromium from puppeteer
libgbm1 \
firefox-esr \
composer \
php-zip \
rsync \
sudo \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -u 1000 -ms /bin/bash user
RUN echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER user
WORKDIR /home/user
# Install deployer globally and add it to PATH
ENV COMPOSER_HOME="/home/user/.composer"
RUN mkdir -p "${COMPOSER_HOME}"
ADD composer.lock "${COMPOSER_HOME}"
ADD composer.json "${COMPOSER_HOME}"
RUN composer global install
ENV PATH "${COMPOSER_HOME}/vendor/bin:${PATH}"
\ 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/vpu/webcomponents/toolkit/main:v1
\ No newline at end of file
#!/bin/bash
set -e
TAG="registry.gitlab.tugraz.at/vpu/webcomponents/toolkit/main:v1"
sudo docker build --tag "${TAG}" --file "Dockerfile" .
echo "Now run: sudo docker push '$TAG'"
{
"require": {
"symfony/process": " ^4.4",
"symfony/console": " ^4.4",
"symfony/yaml": " ^4.4",
"deployer/deployer": " ^6.4",
"deployer/recipes": " ^6.2"
}
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment