Update (New) Admin UI to 2024-05-08 #1647
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Opencast | |
on: | |
pull_request: | |
paths: | |
- 'pom.xml' | |
- 'modules/**' | |
- 'docs/checkstyle/**' | |
- 'docs/log4j/**' | |
- 'assemblies/**' | |
- '.github/**' | |
push: | |
paths: | |
- 'pom.xml' | |
- 'modules/**' | |
- 'docs/checkstyle/**' | |
- 'docs/log4j/**' | |
- 'assemblies/**' | |
- '.github/**' | |
branches-ignore: | |
- 'dependabot/**' # Don't run dependabot branches, as they are already covered by pull requests | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: | |
- 11 | |
- 17 | |
name: build (java ${{ matrix.java }}) | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cache local maven repository | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
- name: install dependencies | |
run: | | |
sudo apt update -q | |
sudo apt install -y -q \ | |
bzip2 \ | |
ffmpeg \ | |
gzip \ | |
hunspell \ | |
hunspell-de-de \ | |
procps \ | |
s3cmd \ | |
sox \ | |
tar \ | |
tesseract-ocr \ | |
tesseract-ocr-deu \ | |
unzip | |
- name: prepare build | |
run: | | |
sed -i 's/build --skipTests=${skipTests}/build --skipTests=true/' modules/admin-ui-frontend/pom.xml | |
- name: build opencast | |
run: | | |
mvn clean install -Pnone \ | |
--batch-mode \ | |
-Dsurefire.rerunFailingTestsCount=2 \ | |
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ | |
-Dhttp.keepAlive=false \ | |
-Dmaven.wagon.http.pool=false \ | |
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 | |
- name: build assemblies | |
if: matrix.java == 11 | |
working-directory: assemblies | |
run: | | |
mvn clean install -Pallinone \ | |
--batch-mode \ | |
-Dsurefire.rerunFailingTestsCount=2 \ | |
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ | |
-Dhttp.keepAlive=false \ | |
-Dmaven.wagon.http.pool=false \ | |
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 | |
- name: prepare allinone distribution | |
if: matrix.java == 11 | |
working-directory: build | |
run: | | |
tar xf opencast-dist-allinone*.tar.gz | |
- name: verify jar file integrity | |
if: matrix.java == 11 | |
run: | | |
.github/test-jars | |
- name: prepare runtime dependencies | |
if: matrix.java == 11 | |
working-directory: docs/scripts/devel-dependency-containers | |
run: | | |
docker-compose up -d | |
- name: wait for elasticsearch to boot | |
if: matrix.java == 11 | |
run: > | |
curl -fisS --retry 60 --retry-delay 1 --retry-all-errors | |
http://localhost:9200/ | |
- name: integration test | |
if: matrix.java == 11 | |
run: | | |
./build/opencast-dist-allinone/bin/start-opencast daemon & | |
curl -fisS --retry 30 --retry-delay 10 --retry-all-errors -u admin:opencast http://localhost:8080/sysinfo/bundles/version | |
./build/opencast-dist-allinone/bin/stop-opencast | |
- name: show logs on failure | |
if: ${{ failure() }} | |
run: cat build/opencast-dist-allinone/data/log/opencast.log || true | |
- name: save version | |
working-directory: build | |
if: > | |
github.event_name == 'push' | |
&& matrix.java == 11 | |
&& github.repository == 'opencast/opencast' | |
&& (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/r/')) | |
run: | | |
git log -n1 > "$(echo "${GITHUB_REF#refs/heads/}" | sed 's#/#_#').commit" | |
- name: configure s3cmd | |
if: > | |
github.event_name == 'push' | |
&& matrix.java == 11 | |
&& github.repository == 'opencast/opencast' | |
&& (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/r/')) | |
env: | |
S3_HOST: ${{ secrets.S3_HOST }} | |
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} | |
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} | |
run: | | |
echo "host_base = ${S3_HOST}" > "$HOME/.s3cfg" | |
echo "host_bucket = ${S3_HOST}" >> "$HOME/.s3cfg" | |
echo "bucket_location = us-east-1" >> "$HOME/.s3cfg" | |
echo "use_https = True" >> "$HOME/.s3cfg" | |
echo "access_key = ${S3_ACCESS_KEY}" >> "$HOME/.s3cfg" | |
echo "secret_key = ${S3_SECRET_KEY}" >> "$HOME/.s3cfg" | |
echo "signature_v2 = False" >> "$HOME/.s3cfg" | |
- name: upload assets | |
working-directory: build | |
if: > | |
github.event_name == 'push' | |
&& matrix.java == 11 | |
&& github.repository == 'opencast/opencast' | |
&& (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/r/')) | |
run: | | |
s3cmd put -P *.commit opencast-dist-allinone*tar.gz s3://opencast-daily/ | |
- name: clearing existing data | |
if: matrix.java == 11 | |
working-directory: build | |
run: | | |
rm -rf opencast-dist-allinone | |
tar xf opencast-dist-allinone*.tar.gz | |
- name: upload tarball as workflow asset | |
if: > | |
matrix.java == 11 | |
&& github.repository == 'opencast/opencast' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: opencast-allinone | |
path: build/opencast-dist-allinone/ |