mirror of https://github.com/OpenVidu/openvidu.git
openvidu-ci: Enable snapshots only if snapshot version is used
parent
39323c73a3
commit
da5f55e34b
|
@ -70,6 +70,8 @@ jobs:
|
|||
run: /opt/build.sh --clean-environment
|
||||
- name: Prepare test environment
|
||||
run: /opt/test-utils.sh --prepare-test-environment "${TEST_IMAGE}"
|
||||
- name: Check and prepare kurento snapshots
|
||||
run: /opt/test-utils.sh --check-and-prepare-kurento-snapshot
|
||||
- name: Use specific kurento-java commit
|
||||
if: ${{ env.KURENTO_JAVA_COMMIT != 'default'}}
|
||||
run: /opt/test-utils.sh --use-specific-kurento-java-commit
|
||||
|
|
|
@ -10,6 +10,7 @@ set -eu -o pipefail
|
|||
PREPARE_TEST_ENVIRONMENT=false
|
||||
USE_SPECIFIC_KURENTO_JAVA_COMMIT=false
|
||||
SERVE_OV_TESTAPP=false
|
||||
CHECK_AND_PREPARE_KURENTO_SNAPSHOT=false
|
||||
|
||||
if [[ -n ${1:-} ]]; then
|
||||
case "${1:-}" in
|
||||
|
@ -18,6 +19,10 @@ if [[ -n ${1:-} ]]; then
|
|||
PREPARE_TEST_ENVIRONMENT=true
|
||||
;;
|
||||
|
||||
--check-and-prepare-kurento-snapshot)
|
||||
CHECK_AND_PREPARE_KURENTO_SNAPSHOT=true
|
||||
;;
|
||||
|
||||
--use-specific-kurento-java-commit)
|
||||
USE_SPECIFIC_KURENTO_JAVA_COMMIT=true
|
||||
;;
|
||||
|
@ -59,17 +64,6 @@ if [[ "${PREPARE_TEST_ENVIRONMENT}" == true ]]; then
|
|||
# Prepare directory for OpenVidu Android apps
|
||||
sudo mkdir -p /opt/openvidu/android && sudo chmod 777 /opt/openvidu/android
|
||||
|
||||
# Configure Snapshots repository
|
||||
if [[ -n "${KURENTO_SNAPSHOTS_URL:-}" ]]; then
|
||||
sudo mkdir -p /etc/maven
|
||||
sudo chmod -R 777 /etc/maven
|
||||
pushd /etc/maven
|
||||
rm -f settings.xml
|
||||
curl https://raw.githubusercontent.com/OpenVidu/openvidu/master/ci-scripts/kurento-snapshots.xml -o settings.xml
|
||||
sed -i "s|KURENTO_SNAPSHOTS_URL|${KURENTO_SNAPSHOTS_URL}|g" settings.xml
|
||||
popd
|
||||
fi
|
||||
|
||||
# Download fake videos
|
||||
FAKE_VIDEO1=/opt/openvidu/barcode.y4m
|
||||
FAKE_VIDEO2=/opt/openvidu/girl.mjpeg
|
||||
|
@ -132,6 +126,27 @@ if [[ "${PREPARE_TEST_ENVIRONMENT}" == true ]]; then
|
|||
|
||||
fi
|
||||
|
||||
# -------------
|
||||
# Check kurento version from pom.xml
|
||||
# If kurento version is a snapshot, configure snapshot builds
|
||||
# -------------
|
||||
if [[ "${CHECK_AND_PREPARE_KURENTO_SNAPSHOT}" == true ]]; then
|
||||
# Check if kurento version is a snapshot
|
||||
KURENTO_VERSION=$(awk -F'[<>]' '/<version.kurento>/ {print $3}' pom.xml)
|
||||
if [[ "${KURENTO_VERSION}" == *"-SNAPSHOT" ]] && [[ -n "${KURENTO_SNAPSHOTS_URL:-}" ]]; then
|
||||
echo "Kurento version is a SNAPSHOT: ${KURENTO_VERSION}"
|
||||
sudo mkdir -p /etc/maven
|
||||
sudo chmod -R 777 /etc/maven
|
||||
pushd /etc/maven
|
||||
rm -f settings.xml
|
||||
curl https://raw.githubusercontent.com/OpenVidu/openvidu/master/ci-scripts/kurento-snapshots.xml -o settings.xml
|
||||
sed -i "s|KURENTO_SNAPSHOTS_URL|${KURENTO_SNAPSHOTS_URL}|g" settings.xml
|
||||
popd
|
||||
else
|
||||
echo "Kurento version is not a SNAPSHOT: ${KURENTO_VERSION}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# -------------
|
||||
# Use a specific kurento-java commit other than the configured in openvidu-parent pom.xml
|
||||
# -------------
|
||||
|
|
Loading…
Reference in New Issue