1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Update .gitlab-ci.yml

This commit is contained in:
Stephan Jauernick 2022-03-26 00:16:49 +00:00
parent 0b2253ae40
commit b4b9f45a50

View File

@ -1,15 +1,12 @@
# Build Icecast - test # Build Icecast - test
make_dist:
variables:
GIT_SUBMODULE_STRATEGY: recursive
tags: image: alpine:3.15
tags:
- docker - docker
- linux
image: alpine:3.15 .TemplateAlpine:
stage: build
before_script: before_script:
- set -xe - set -xe
- apk update - apk update
@ -23,38 +20,59 @@ make_dist:
# Create user to run tests # Create user to run tests
#- adduser -s /bin/sh -D -H icecast #- adduser -s /bin/sh -D -H icecast
make_dist:
extends: .TemplateAlpine
variables:
GIT_SUBMODULE_STRATEGY: recursive
LIBIGLOO_PACKAGE_PREFIX: "alpine-libigloo-bins"
LIBIGLOO_PACKAGE_VERSION: "0.91"
LIBIGLOO_PROJECT_ID: 143
stage: build
script: script:
- set -xe # yes i know the scripts will be merged... but for sanities sake - set -xe # yes i know the scripts will be merged... but for sanities sake
- ./autogen.sh - ./autogen.sh
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig - export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
- 'curl -LO --header "JOB-TOKEN: $CI_JOB_TOKEN" "${CI_API_V4_URL}/projects/143/packages/generic/libigloo-bins/0.0.1-$CI_COMMIT_REF_NAME/libigloo-$CI_COMMIT_REF_NAME.tar.gz"' # we build these in script as gitlab does not support nested expansion in above variables(or it is not well documented)
- tar -C / -xvzf libigloo-$CI_COMMIT_REF_NAME.tar.gz - if echo "$CI_COMMIT_REF_NAME" | grep '-with-libigloo$'; then export LIBIGLOO_PACKAGE_SUFFIX=`echo "$CI_COMMIT_REF_NAME" | sed 's/-with-libigloo$//'`; elif echo "$CI_COMMIT_REF_NAME" | grep '^devel'; then export LIBIGLOO_PACKAGE_SUFFIX='devel'; else export LIBIGLOO_PACKAGE_SUFFIX='master'; fi
- export LIBIGLOO_PACKAGE_BASE=$LIBIGLOO_PACKAGE_PREFIX-$LIBIGLOO_PACKAGE_SUFFIX
- export LIBIGLOO_PACKAGE_ARCHIVE=$LIBIGLOO_PACKAGE_BASE.tar.gz
- 'curl -LO --header "JOB-TOKEN: $CI_JOB_TOKEN" "${CI_API_V4_URL}/projects/$LIBIGLOO_PROJECT_ID/packages/generic/$LIBIGLOO_PACKAGE_PREFIX/$LIBIGLOO_PACKAGE_BASE/$LIBIGLOO_PACKAGE_ARCHIVE"'
- tar -C / -xvzf $LIBIGLOO_PACKAGE_ARCHIVE
- ls -la /usr/local/lib - ls -la /usr/local/lib
- ./configure || cat config.log - ./configure || cat config.log
- make dist - make dist
- ls -la
- make install DESTDIR=`pwd`/_install_base/
- ls -la
- ls -la _install_base/
- cd _install_base/
- tar -cvzf ../icecast-$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/icecast-bins/0.0.1-$CI_COMMIT_REF_NAME/icecast-$CI_COMMIT_REF_NAME.tar.gz"'
# Tests # Tests
#- su -c "./tests/admin-tests.sh" icecast #- su -c "./tests/admin-tests.sh" icecast
artifacts: artifacts:
paths: untracked: true
- icecast-*.tar.gz
- icecast-*.zip
expire_in: 1 week expire_in: 1 week
upload_dist: upload_package:
tags: extends: .TemplateAlpine
- docker stage: deploy
- linux variables:
ICECAST_SERVER_VERSION: "2.4.99.3"
ICECAST_SERVER_PREFIX: "alpine-icecast-server-bins"
script:
- make install DESTDIR=`pwd`/_install_base/
- cd _install_base/
# see above
- export ICECAST_SERVER_BASE=$ICECAST_SERVER_PREFIX-$CI_COMMIT_REF_NAME
- export ICECAST_SERVER_ARCHIVE=$ICECAST_SERVER_BASE.tar.gz
- tar -cvzf ../$ICECAST_SERVER_ARCHIVE *
- cd ..
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file $ICECAST_SERVER_ARCHIVE "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/$ICECAST_SERVER_PREFIX/$ICECAST_SERVER_BASE/$ICECAST_SERVER_ARCHIVE"'
needs:
- "make_dist"
upload_dist:
only: only:
- master - master
- devel - devel
@ -71,10 +89,6 @@ upload_dist:
- ./ci/osc/handle-osc-upload.sh - ./ci/osc/handle-osc-upload.sh
upload_dist_release: upload_dist_release:
tags:
- docker
- linux
only: only:
- tags - tags