Skip to content

Commit f10b39b

Browse files
committed
Set capture agent inputs to true per default
When scheduling an event, ensures that all inputs for the capture agent are initially selected. Also fixes a potential source of bugs by cleaning up the selected inputs everytime the capture is changed.
2 parents abd4927 + 92c4d34 commit f10b39b

File tree

496 files changed

+14870
-28447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

496 files changed

+14870
-28447
lines changed

.github/demo-page.html

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/get-release-server.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
if [ $# -ne 1 ]; then
4+
echo "Usage: $0 OC_VERSION"
5+
echo " eg: $0 r/16.x -> Returns the current correct server for r/16.x"
6+
exit 1
7+
fi
8+
9+
git clone https://github.com/opencast/opencast.git ~/opencast
10+
cd ~/opencast
11+
12+
#Get the list of *all* branches in the format remotes/origin/r/N.m
13+
#grep for r/N.x
14+
#then use cut to remove remotes/origin
15+
ary=( `git branch -a | grep 'r/[0-9]*.x' | head -n 3 | cut -f 3- -d '/'` )
16+
17+
#Iterate through the array above.
18+
#If the script input matches the first item, spit out develop
19+
#If the script iput matches hte second item... etc
20+
#If it doesn't match anything, then don't say anything
21+
for i in "${!ary[@]}"
22+
do
23+
if [[ "${ary[$i]}" = "$1" ]]; then
24+
if [[ $i -eq 0 ]]; then
25+
echo "develop.opencast.org"
26+
elif [[ $i -eq 1 ]]; then
27+
echo "stable.opencast.org"
28+
elif [[ $i -eq 2 ]]; then
29+
echo "legacy.opencast.org"
30+
fi
31+
fi
32+
done

.github/workflows/create-release.yml

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,26 @@
11
on:
2-
push:
3-
tags:
4-
- '*-*-*'
2+
workflow_dispatch:
53

6-
name: Create release draft
4+
name: Create release tag
75

86
jobs:
97
build:
10-
name: Create release from tag
8+
name: Create release tag
119
runs-on: ubuntu-latest
1210
steps:
1311
- name: checkout code
1412
uses: actions/checkout@v4
15-
16-
- name: get node.js
17-
uses: actions/setup-node@v4
1813
with:
19-
node-version: 20
20-
21-
- name: download dependencies
22-
run: npm ci
14+
fetch-depth: 0
2315

24-
- name: build release
25-
env:
26-
PUBLIC_URL: /admin-ui
27-
run: npm run build
16+
- name: prepare git
17+
run: |
18+
git config --global user.email '[email protected]'
19+
git config --global user.name 'Release Bot'
2820
29-
- name: create release tarball
30-
working-directory: build
31-
run: tar -czf "../oc-admin-ui-$(date -u +%F).tar.gz" *
32-
33-
- name: create new release
34-
uses: softprops/action-gh-release@v2
35-
with:
36-
files: ./oc-admin-ui-*.tar.gz
37-
draft: true
38-
fail_on_unmatched_files: true
39-
generate_release_notes: true
21+
- name: tag and push
22+
run: |
23+
export TEMP=${{ github.ref_name }}
24+
export TAG=${TEMP#r\/}-`date +%Y-%m-%d`
25+
git tag $TAG
26+
git push origin $TAG

.github/workflows/deploy-main.yml

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Publish Test Page
33
on:
44
push:
55
branches:
6-
- main
6+
- develop
7+
- r/*.x
78

89
concurrency:
9-
group: ${{ github.workflow }}-${{ github.ref }}
10-
cancel-in-progress: true
10+
group: ${{ github.workflow }}
1111

1212
jobs:
1313
build:
@@ -25,41 +25,44 @@ jobs:
2525
- name: download dependencies
2626
run: npm ci
2727

28+
- name: determine the correct test server
29+
id: vite-url
30+
run: echo "VITE_TEST_SERVER_URL=`./.github/get-release-server.sh ${{ github.ref_name }}`" >> GITHUB_ENV
31+
2832
- name: build project
33+
env:
34+
VITE_TEST_SERVER_URL: ${{ steps.vite-url.outputs.VITE_TEST_SERVER_URL }}
35+
NODE_ENV: development
36+
VITE_TEST_SERVER_AUTH: "admin:opencast"
2937
run: npm run build
3038

31-
- name: create pages directory
32-
run: mkdir gh-pages
33-
34-
- name: include admin interface
35-
run: mv build gh-pages/admin-ui
36-
37-
- name: include mock data
38-
working-directory: ./gh-pages
39-
run: cp -rv ../test/GET/* .
39+
- name: Prepare git
40+
run: |
41+
git config --global user.name "Release Bot"
42+
git config --global user.email "[email protected]"
4043
41-
- name: include landing page
42-
run: cp .github/demo-page.html gh-pages/index.html
44+
- name: Commit new version
45+
run: |
46+
git fetch origin
47+
git checkout gh-pages
48+
#Temp becomes something like r/17.x
49+
export TEMP=${{ github.ref_name }}
50+
#Strip the r/ prefix, giving us just 17.x. If this is main/develop this does nothing
51+
export TARGET=${TEMP#r\/}
52+
# Update gh-pages
53+
rm -rf $TARGET
54+
mkdir -p $TARGET
55+
cp -r build/* $TARGET
56+
#Generate an index, in case anyone lands at the root of the test domain
57+
echo '<html><body><ul>' > index.html
58+
find . -mindepth 1 -maxdepth 1 -type d \
59+
| grep -v .git \
60+
| sort -r \
61+
| sed 's/^\(.*\)$/<li><a href=\1>\1<\/a><\/li>/' >> index.html
62+
echo '</ul></body></html>' >> index.html
63+
git add $TARGET
64+
git diff --staged --quiet || git commit --amend -m "Build $(date)"
4365
44-
- name: upload test page artifact
45-
uses: actions/upload-pages-artifact@v3
46-
with:
47-
path: ./gh-pages
48-
49-
deploy:
50-
if: github.repository_owner == 'opencast'
51-
needs: build
52-
53-
permissions:
54-
pages: write
55-
id-token: write
56-
57-
environment:
58-
name: github-pages
59-
url: ${{ steps.deployment.outputs.page_url }}
60-
61-
runs-on: ubuntu-latest
62-
steps:
63-
- name: deploy to GitHub Pages
64-
id: deployment
65-
uses: actions/deploy-pages@v4
66+
- name: Push updates
67+
run: |
68+
git push origin gh-pages --force

.github/workflows/deploy-test.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
- opened
77
- synchronize
88

9+
concurrency:
10+
group: pull-request-page
11+
cancel-in-progress: false
12+
913
jobs:
1014
main:
1115
runs-on: ubuntu-latest
@@ -20,17 +24,23 @@ jobs:
2024
ref: ${{ github.event.pull_request.head.ref }}
2125
repository: ${{ github.event.pull_request.head.repo.full_name }}
2226

23-
- name: get Node.js
27+
- name: get node.js
2428
uses: actions/setup-node@v4
2529
with:
2630
node-version: 20
2731

2832
- name: download dependencies
2933
run: npm ci
3034

35+
- name: determine the correct test server
36+
id: vite-url
37+
run: echo "VITE_TEST_SERVER_URL=`./.github/get-release-server.sh ${{ github.base_ref }}`" >> GITHUB_ENV
38+
3139
- name: build app
3240
env:
33-
PUBLIC_URL: /${{ steps.build-path.outputs.build }}
41+
VITE_TEST_SERVER_URL: ${{ steps.vite-url.outputs.VITE_TEST_SERVER_URL }}
42+
NODE_ENV: development
43+
VITE_TEST_SERVER_AUTH: "admin:opencast"
3444
run: npm run build
3545

3646
- name: prepare git
@@ -63,10 +73,6 @@ jobs:
6373
run: |
6474
git checkout gh-pages
6575
66-
- name: include mock data
67-
working-directory: admin-interface-test
68-
run: cp -rv ../test/GET/* .
69-
7076
- name: store build
7177
working-directory: admin-interface-test
7278
env:

.github/workflows/process-release.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
tags:
5+
# CF: 17.x-YYYY-MM-DD
6+
- '*.x-*-*-*'
7+
8+
name: Create release
9+
jobs:
10+
build:
11+
name: Create release from tag
12+
if: github.repository_owner == 'opencast'
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write #for the release
16+
pull-requests: write #For the PR in the upstream repo
17+
18+
steps:
19+
- name: checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: get node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
27+
- name: download dependencies
28+
run: npm ci
29+
30+
- name: build release
31+
env:
32+
PUBLIC_URL: /admin-ui
33+
run: npm run build
34+
35+
- name: create release tarball
36+
working-directory: build
37+
run: |
38+
tar -czf "../oc-admin-ui-$(git describe --tags).tar.gz" *
39+
echo INTERFACE_CHECKSUM=`sha256sum oc-admin-ui-$(git describe --tags).tar.gz | cut -f 1 -d " "` >> $GITHUB_ENV
40+
echo INTERFACE_TAG=$(git describe --tags) >> $GITHUB_ENV
41+
echo BASE_BRANCH=$(git describe --tags | cut -c 1-4) >> $GITHUB_ENV
42+
43+
- name: create new release
44+
uses: softprops/action-gh-release@v2
45+
with:
46+
files: oc-admin-ui-*.tar.gz
47+
fail_on_unmatched_files: true
48+
generate_release_notes: true
49+
50+
- name: Prepare git
51+
run: |
52+
git config --global user.name "Release Bot"
53+
git config --global user.email "[email protected]"
54+
55+
- name: Prepare GitHub SSH key
56+
env:
57+
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
58+
run: |
59+
install -dm 700 ~/.ssh/
60+
echo "${DEPLOY_KEY}" > ~/.ssh/id_ed25519
61+
chmod 600 ~/.ssh/id_ed25519
62+
ssh-keyscan github.com >> ~/.ssh/known_hosts
63+
64+
- name: Clone upstream repository
65+
run: |
66+
#This token is an account wide token which allows creation of PRs and pushes.
67+
#echo "GH_TOKEN=${{ secrets.ACCESS_TOKEN }}" >> token.txt
68+
#gh auth login --with-token < token.txt
69+
git clone -b r/$BASE_BRANCH "[email protected]:opencast/opencast.git" ~/opencast
70+
cd ~/opencast
71+
git checkout -b t/admin-ui-$INTERFACE_TAG
72+
73+
- name: Update the admin ui pom file
74+
#env:
75+
# GH_TOKEN: ${{ github.token }}
76+
run: |
77+
cd ~/opencast
78+
sed -i "s#<interface.sha256>.*</interface.sha256>#<interface.sha256>$INTERFACE_CHECKSUM</interface.sha256>#" modules/admin-ui-interface/pom.xml
79+
sed -i "s#<interface.url>.*</interface.url>#<interface.url>https://github.com/opencast/opencast-admin-interface/releases/download/$INTERFACE_TAG/oc-admin-ui-$INTERFACE_TAG.tar.gz</interface.url>#" modules/admin-ui-interface/pom.xml
80+
git add modules/admin-ui-interface/pom.xml
81+
git commit -m "Updating admin ui to $INTERFACE_TAG"
82+
git push origin t/admin-ui-$INTERFACE_TAG
83+
#This token is an account wide token which allows creation of PRs and pushes.
84+
echo "${{ secrets.PR_TOKEN }}" > token.txt
85+
gh auth login --with-token < token.txt
86+
gh pr create --title "Update $BASE_BRANCH Admin UI to $INTERFACE_TAG" --label admin-ui --label maintenance --body "Updating Opencast $BASE_BRANCH Admin UI module to $INTERFACE_TAG" --head=opencast:t/admin-ui-$INTERFACE_TAG --base r/$BASE_BRANCH -R opencast/opencast

.github/workflows/remove-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
types:
66
- closed
77

8+
concurrency:
9+
group: pull-request-page
10+
cancel-in-progress: false
11+
812
env:
913
PR_NUMBER: ${{ github.event.pull_request.number }}
1014

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ WORKDIR /admin-interface
66

77
RUN npm ci
88

9-
ENV CI true
10-
ENV BROWSER none
9+
ENV CI=true
10+
ENV BROWSER=none
1111
CMD [ "npm", "start", "--", "--host", "0.0.0.0"]

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ PROXY_TARGET=http://localhost:8080 PROXY_AUTH=jdoe:aligator3 npm start
5050
Similarly, if you want to change the port the development server itself runs at,
5151
you can specify an alternative port in the `PORT` environment variable.
5252

53+
If you aim to test against a remote server without using a proxy, you have the option to configure the target server with the `VITE_TEST_SERVER_URL`, and the `VITE_TEST_SERVER_AUTH` environment variables while using the node development mode:
54+
55+
```sh
56+
NODE_ENV=development VITE_TEST_SERVER_URL="https://develop.opencast.org" VITE_TEST_SERVER_AUTH="admin:opencast" npm start
57+
```
5358

5459
How to cut a release for Opencast
5560
---------------------------------

0 commit comments

Comments
 (0)