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

Don't run CI jobs as root

parent 7ba8e977
No related branches found
No related tags found
No related merge requests found
image: debian:buster image: registry.gitlab.tugraz.at/vpu/webcomponents/common/main:v2
before_script: before_script:
- apt update
- apt install -y git
- "sed -i 's|git@gitlab.tugraz.at:VPU|../..|g' .gitmodules" - "sed -i 's|git@gitlab.tugraz.at:VPU|../..|g' .gitmodules"
- git submodule sync - git submodule sync
- git submodule update --init - git submodule update --init
...@@ -13,7 +11,5 @@ stages: ...@@ -13,7 +11,5 @@ stages:
test: test:
stage: test stage: test
script: script:
- apt update
- apt install -y npm chromium
- npm install - npm install
- npm test - npm test
...@@ -5,13 +5,21 @@ ENV DEBIAN_FRONTEND noninteractive ...@@ -5,13 +5,21 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
git \ git \
curl curl \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - 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 \ RUN apt-get update && apt-get install -y \
nodejs \ nodejs \
chromium-browser \ chromium-browser \
firefox \ firefox \
composer \ composer \
rsync rsync \
\ No newline at end of file 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
#!/bin/bash #!/bin/bash
set -e set -e
TAG="registry.gitlab.tugraz.at/vpu/webcomponents/common/main:v1" TAG="registry.gitlab.tugraz.at/vpu/webcomponents/common/main:v2"
sudo docker build --tag "${TAG}" --file "Dockerfile" . sudo docker build --tag "${TAG}" --file "Dockerfile" .
echo "Now run: sudo docker push '$TAG'" echo "Now run: sudo docker push '$TAG'"
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