Merge pull request #18 from kasmtech/gitlab-pipeline-produce-deb

Gitlab pipeline produce deb
This commit is contained in:
Kasm 2021-02-03 12:51:27 -05:00 committed by GitHub
commit 57f4e0a856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View File

@ -2,15 +2,19 @@ image: docker
services:
- docker:dind
variables:
GITLAB_SHARED_DIND_DIR: /builds/$CI_PROJECT_PATH/shared
stages:
- build
build:
stage: build
script:
- ls -l
- pwd
- apk add bash
- mkdir -p "$GITLAB_SHARED_DIND_DIR" && chmod 777 "$GITLAB_SHARED_DIND_DIR"
- bash builder/build-tarball
- bash builder/build-deb
- mkdir output

View File

@ -6,4 +6,4 @@ cd "$(dirname "$0")/.."
dpkg-buildpackage -us -uc -b
cp ../*.deb builder/build
lintian ../*.deb
lintian ../*.deb || true

View File

@ -4,9 +4,11 @@ set -e
build_www_dir() {
docker build -t kasmweb/www -f builder/dockerfile.www.build .
docker run -it --rm -v $PWD/builder/www:/build kasmweb/www:latest
docker run --rm -v $PWD/builder/www:/build kasmweb/www:latest
}
shared_with_docker_dir=${GITLAB_SHARED_DIND_DIR:-/tmp}
cd "$(dirname "$0")/.."
build_www_dir
@ -14,9 +16,9 @@ build_www_dir
docker pull ubuntu:18.04
docker build -t kasmvncbuilder:18.04 -f builder/dockerfile.ubuntu1804.build .
mkdir -p builder/build
docker run -v /tmp:/build --rm kasmvncbuilder:18.04
docker run -v $shared_with_docker_dir:/build --rm kasmvncbuilder:18.04
L_GID=$(id -g)
L_UID=$(id -u)
chown $L_UID:$L_GID /tmp/kasmvnc.ubuntu_18.04.tar.gz
mv /tmp/kasmvnc.ubuntu_18.04.tar.gz $PWD/builder/build/
chown $L_UID:$L_GID $shared_with_docker_dir/kasmvnc.ubuntu_18.04.tar.gz
mv $shared_with_docker_dir/kasmvnc.ubuntu_18.04.tar.gz $PWD/builder/build/