Commit 99a62aac authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

Feature: Added packaging stage

parent 287b3935
......@@ -2,6 +2,7 @@ stages:
- build
- test
- sanitizer
- packaging
default:
image: registry.gitlab.xiph.org/xiph/icecast-docker-images/debian-bullseye:20220321214518
......@@ -10,6 +11,23 @@ default:
# Builds
.TemplateAlpine:
image: alpine:3.15
before_script:
- set -xe
- apk update
- cat /etc/os*
- apk add musl-dev git make gcc automake autoconf libtool
- apk add libc6-compat
# gzip required because busybox gzip does not understand best / zip for make dist
- apk add gzip zip tar
# required for uploading package to gitlab registry
- apk add curl ca-certificates
# Required for tests
#- apk add curl ffmpeg
# Create user to run tests
#- adduser -s /bin/sh -D -H icecast
Build (x86_64):
stage: build
script:
......@@ -22,33 +40,13 @@ Build (x86_64):
expire_in: 1 hour
Build Alpine (x86_64):
extends: .TemplateAlpine
stage: build
image: alpine:3.15
before_script:
- apk update
- cat /etc/os*
- apk add musl-dev git make gcc automake autoconf libtool curl ca-certificates
- apk add libc6-compat
# gzip required because busybox gzip does not understand best / zip for make dist
- apk add gzip zip tar
# Required for tests
#- apk add curl ffmpeg
# Create user to run tests
#- adduser -s /bin/sh -D -H icecast
script:
- gcc --version
- ./autogen.sh
- ./configure || { cat config.log; exit 1; }
- make
- mkdir _install_base
- make install DESTDIR=`pwd`/_install_base/
- ls -la
- ls -la _install_base/
- cd _install_base/
- tar -cvzf ../libigloo-$CI_COMMIT_REF_NAME.tar.gz *
- cd ..
- ls -la
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file libigloo-$CI_COMMIT_REF_NAME.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/libigloo-bins/0.0.1-$CI_COMMIT_REF_NAME/libigloo-$CI_COMMIT_REF_NAME.tar.gz"'
artifacts:
untracked: true
expire_in: 1 hour
......@@ -105,15 +103,8 @@ Test (x86_64):
- 'Build (x86_64)'
Test Alpine (x86_64):
extends: .TemplateAlpine
stage: test
image: alpine:3.15
before_script:
- apk update
- cat /etc/os*
- apk add musl-dev git make gcc automake autoconf libtool curl ca-certificates
- apk add libc6-compat
# gzip required because busybox gzip does not understand best / zip for make dist
- apk add gzip zip tar
script:
- make check || { cat test-suite.log; exit 1; }
needs:
......@@ -141,3 +132,17 @@ Distcheck:
expire_in: 1 week
needs:
- 'Build (x86_64)'
Package Alpine (x86_64):
extends: .TemplateAlpine
stage: packaging
script:
- mkdir _install_base
- make install DESTDIR=`pwd`/_install_base/
- cd _install_base/
- tar -cvzf ../libigloo-$CI_COMMIT_REF_NAME.tar.gz *
- cd ..
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file libigloo-$CI_COMMIT_REF_NAME.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/libigloo-bins/0.0.1-$CI_COMMIT_REF_NAME/libigloo-$CI_COMMIT_REF_NAME.tar.gz"'
when: manual
needs:
- 'Test Alpine (x86_64)'
Supports Markdown
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