Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
143c37c
Updated services (#6907)
m-schieder May 5, 2025
9b0cd27
Create patchnotes for 4.2.9 (#6908)
rrenkert May 5, 2025
706b044
Updated services (#6911)
m-schieder May 7, 2025
51754c1
Create patchnotes for 4.2.10 (#6913)
rrenkert May 7, 2025
ecde8fa
Updated services (#6915)
m-schieder May 12, 2025
f6c5564
Create patchnotes for 4.2.11 (#6916)
rrenkert May 12, 2025
cb77d44
Updated services (#6919)
m-schieder May 14, 2025
748010f
Updated translations (#6920)
emanuelschuetze May 15, 2025
0322c19
Create patchnotes for 4.2.12 (#6923)
rrenkert May 15, 2025
13df241
Remove milestone from pick-to-staging.yml (#6922)
rrenkert May 16, 2025
60b79e7
Create patchnotes for 4.2.13 (#6925)
rrenkert May 23, 2025
d89f7ce
Updated services (#6928)
Elblinator Jun 4, 2025
7bfe81a
Staging update 20250604
Elblinator Jun 4, 2025
fcd3bb4
Almost works?
Janmtbehrens Jun 5, 2025
f511923
Staging update 20250605
Elblinator Jun 5, 2025
4174d59
Build and Test Action
Janmtbehrens Jun 5, 2025
50ff8cf
Test
Janmtbehrens Jun 5, 2025
439b078
Test #2
Janmtbehrens Jun 5, 2025
f615418
Test #3
Janmtbehrens Jun 5, 2025
82c2910
Auth Test
Janmtbehrens Jun 5, 2025
64dbfac
Merged all Submodules
Janmtbehrens Jun 10, 2025
cc1117c
Fixed production image names and various bugs
Janmtbehrens Jun 10, 2025
3d1ab6f
Small test action fix
Janmtbehrens Jun 10, 2025
3c62d93
Staging update 20250610
Elblinator Jun 10, 2025
cfd8a0a
Staging update 20250611
Elblinator Jun 11, 2025
359d72c
Adjust Workflows
Janmtbehrens Jun 12, 2025
48e3aae
Adjust Workflows #3
Janmtbehrens Jun 12, 2025
6670973
Fetch script update
Janmtbehrens Jun 12, 2025
be17c55
Bump
Janmtbehrens Jun 12, 2025
74cb740
Remove command.sh from some Go Services
Janmtbehrens Jun 16, 2025
fb21a0c
Some more command.sh changes
Janmtbehrens Jun 16, 2025
430c02e
Dockerfile.Dev Workaround
Janmtbehrens Jun 16, 2025
f7c9bd6
Merge with upstream
Janmtbehrens Jun 16, 2025
ef8e3eb
Removing old Dockerfiles
Janmtbehrens Jun 16, 2025
3a4b4a3
Merge remote-tracking branch 'upstream/staging/4.2.14' into all-in-one
Janmtbehrens Jun 16, 2025
12e9b91
Merge with upstream
Janmtbehrens Jun 16, 2025
2192974
Go Update
Janmtbehrens Jun 16, 2025
5d2610d
Merge with main & Workflow check
Janmtbehrens Jun 17, 2025
c98c57c
Final changes
Janmtbehrens Jun 17, 2025
4986664
Create unified and standardized continuous integration workflow for e…
Janmtbehrens Jun 17, 2025
5850e5a
Small fixes, Typos and Standards
Janmtbehrens Jun 17, 2025
12ea9df
Update Submodule References
Janmtbehrens Jun 19, 2025
13d54b8
Bump
Janmtbehrens Jun 19, 2025
2a2a94d
Adding Build instruction to dev compose file
Janmtbehrens Jun 23, 2025
b9d2ed5
Add Shellcheck Linter
Janmtbehrens Jun 23, 2025
e40c930
Lint scripts via Shellcheck
Janmtbehrens Jun 23, 2025
d26552f
More linting fixes
Janmtbehrens Jun 23, 2025
2050f1d
Bump
Janmtbehrens Jun 24, 2025
51ea225
Spellcheck linting
Janmtbehrens Jun 24, 2025
81443a5
Spellchecks
Janmtbehrens Jun 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/debug-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
on: push
on: deployment

jobs:
test-job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test
run: echo "Hey"
- name: Test actions
uses: Janmtbehrens/OpenSlides/dev/actions/test-submodule@main
uses: Janmtbehrens/OpenSlides/dev/actions/build-and-test-service@all-in-one
with:
service: auth
1 change: 0 additions & 1 deletion .github/workflows/pick-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ jobs:
reviewers: ${{ github.event.pull_request.user.login }}
assignees: ${{ github.event.pull_request.user.login }}
labels: picked-to-staging
milestone: 4
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ run-dev-otel: | build-dev
build-dev:
sed -i "1s/.*/$(GO_VERSION)/" $(DOCKER_PATH)/workspaces/*.work
chmod +x $(SCRIPT_PATH)/makefile/build-all-submodules.sh
$(SCRIPT_PATH)/makefile/build-all-submodules.sh
$(SCRIPT_PATH)/makefile/build-all-submodules.sh dev

# Run the tests of all services
run-service-tests:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.8-dev
4.2.14
4 changes: 4 additions & 0 deletions dev/actions/build-and-test-service/action-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

bash dev/run-tests.sh

19 changes: 19 additions & 0 deletions dev/actions/build-and-test-service/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Build and run service tests'
description: 'Build test context image and runs all tests of service.'

inputs:
service:
description: 'Name of the service. Examples: proxy, auth, datastore'
required: true

runs:
using: "composite"
steps:
- name: "Build Test"
uses: Janmtbehrens/OpenSlides/dev/actions/build-service@all-in-one
with:
service: ${{ inputs.service }}
context: tests
- name: "Test Service"
shell: bash
run: bash $GITHUB_ACTION_PATH/action-run.sh
6 changes: 2 additions & 4 deletions dev/actions/build-service/action-run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/bash

printenv

chmod +x ${GITHUB_ACTION_PATH}/../../scripts/makefile/build-service.sh
${GITHUB_ACTION_PATH}/../../scripts/makefile/build-service.sh ${SERVICE} ${CONTEXT} ${MODULE} ${PORT}
chmod +x "${GITHUB_ACTION_PATH}"/../../scripts/makefile/build-service.sh
"${GITHUB_ACTION_PATH}"/../../scripts/makefile/build-service.sh "${SERVICE}" "${CONTEXT}" "${MODULE}" "${PORT}"
5 changes: 0 additions & 5 deletions dev/actions/test-submodule/action-run.sh

This file was deleted.

9 changes: 0 additions & 9 deletions dev/actions/test-submodule/action.yml

This file was deleted.

27 changes: 13 additions & 14 deletions dev/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ OPT_IMAGES=

usage() {
cat << EOF
Usage: $(basename ${BASH_SOURCE[0]}) [<options>] <service>...
Usage: $(basename "${BASH_SOURCE[0]}") [<options>] <service>...

Options:
-D, --docker-repo Specify a Docker repository
Expand All @@ -58,8 +58,8 @@ fi

shortopt="hr:D:t:"
longopt="help,docker-repo:,tag:,no-cache,ask-push,yes,images"
ARGS=$(getopt -o "$shortopt" -l "$longopt" -n "$ME" -- "$@")
if [ $? -ne 0 ]; then usage; exit 1; fi
ARGS=$(getopt -o "$shortopt" -l "$longopt" -n "$ME" -- "$@") || { usage; exit 1; }

eval set -- "$ARGS";
unset ARGS

Expand All @@ -75,7 +75,7 @@ while true; do
shift 2
;;
--no-cache)
OPTIONS+="--no-cache"
OPTIONS+=("--no-cache")
shift 1
;;
--ask-push)
Expand All @@ -96,9 +96,8 @@ while true; do
esac
done

SELECTED_TARGETS=($@)
[[ "${#SELECTED_TARGETS[@]}" -ge 1 ]] || SELECTED_TARGETS=("${DEFAULT_TARGETS[@]}")
[[ "${SELECTED_TARGETS[@]}" != "all" ]] || SELECTED_TARGETS=("${!TARGETS[@]}")
SELECTED_TARGETS=("$@")
if [ "$#" == 0 ]; then SELECTED_TARGETS=("${DEFAULT_TARGETS[@]}"); elif [ "$*" = "all" ]; then SELECTED_TARGETS=("${!TARGETS[@]}"); fi

OPTIONS+=(--build-arg "VERSION=$DOCKER_TAG")

Expand All @@ -122,7 +121,7 @@ for i in "${SELECTED_TARGETS[@]}"; do
fi

echo "Building $img..."
cd $loc
cd "$loc" || exit 1
{
printf '{\n'
printf '\t"service": "%s,\n' "${i}"
Expand Down Expand Up @@ -152,7 +151,7 @@ if [[ "${#BUILT_IMAGES[@]}" -ge 1 ]]; then
printf "\nSuccessfully built images:\n\n"
for i in "${BUILT_IMAGES[@]}"; do
read -r img x <<< "$i"
printf " - $img\n"
printf " - %s\n" "$img"
done
else
echo "No images were built."
Expand All @@ -161,27 +160,27 @@ fi

[[ -n "$ASK_PUSH" ]] || exit 0

if [ -n $OPT_YES ] || ! hash whiptail > /dev/null 2>&1; then
if [ -n "$OPT_YES" ] || ! hash whiptail > /dev/null 2>&1; then
echo
for i in "${BUILT_IMAGES[@]}"; do
read -r img x <<< "$i"
if [ -n $OPT_YES ]; then
if [ -n "$OPT_YES" ]; then
REPL=y
else
read -p "Push image '$img' to repository? [Y/n] " REPL
read -r -p "Push image '$img' to repository? [Y/n] " REPL
fi
case "$REPL" in
N|n|No|no|NO) exit 0;;
*) docker push "$img" ;;
esac
done
else
while read img; do
while read -r img; do
echo "Pushing ${img}."
docker push "$img"
done < <( whiptail --title "OpenSlides build script" \
--checklist "Select images to push to their registry." \
25 78 16 --separate-output --noitem --clear \
${BUILT_IMAGES[@]} \
"${BUILT_IMAGES[@]}" \
3>&2 2>&1 1>&3 )
fi
64 changes: 64 additions & 0 deletions dev/docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
version: "3"
services:
datastore-reader:
build:
context: ../../openslides-datastore-service
target: "dev"
args:
CONTEXT: "dev"
MODULE: "reader"
PORT: "9010"
image: openslides-datastore-reader-dev
depends_on:
- postgres
Expand All @@ -15,6 +22,13 @@ services:
- 5680:5678

datastore-writer:
build:
context: ../../openslides-datastore-service
target: "dev"
args:
CONTEXT: "dev"
MODULE: "writer"
PORT: "9011"
image: openslides-datastore-writer-dev
depends_on:
- postgres
Expand All @@ -37,6 +51,11 @@ services:
- POSTGRES_DB=openslides

client:
build:
context: ../../openslides-client
target: "dev"
args:
CONTEXT: "dev"
image: openslides-client-dev
env_file: services.env
environment:
Expand All @@ -46,6 +65,11 @@ services:
- ../../openslides-client/client/cli:/app/cli

backend:
build:
context: ../../openslides-backend
target: "dev"
args:
CONTEXT: "dev"
image: openslides-backend-dev
depends_on:
- datastore-reader
Expand Down Expand Up @@ -77,6 +101,11 @@ services:
- ../../openslides-backend/scripts:/app/scripts

autoupdate:
build:
context: ../../openslides-autoupdate-service
target: "dev"
args:
CONTEXT: "dev"
image: openslides-autoupdate-dev
depends_on:
- datastore-reader
Expand All @@ -95,6 +124,11 @@ services:
- "9012:9012"

icc:
build:
context: ../../openslides-icc-service
target: "dev"
args:
CONTEXT: "dev"
image: openslides-icc-dev
depends_on:
- datastore-reader
Expand All @@ -112,6 +146,11 @@ services:
- "9007:9007"

search:
build:
context: ../../openslides-search-service
target: "dev"
args:
CONTEXT: "dev"
image: openslides-search-dev
depends_on:
- autoupdate
Expand All @@ -129,6 +168,11 @@ services:
- "9050:9050"

auth:
build:
context: ../../openslides-auth-service
target: "dev"
args:
CONTEXT: "dev"
image: openslides-auth-dev
depends_on:
- datastore-reader
Expand All @@ -142,6 +186,11 @@ services:
- "9004:9004"

media:
build:
context: ../../openslides-media-service
target: "dev"
args:
CONTEXT: "dev"
image: openslides-media-dev
depends_on:
- backend
Expand All @@ -153,6 +202,11 @@ services:
- ../../openslides-media-service/src:/app/src

manage:
build:
context: ../../openslides-manage-service
target: "dev"
args:
CONTEXT: "dev"
image: openslides-manage-dev
depends_on:
- auth
Expand All @@ -169,6 +223,11 @@ services:
- "6379:6379"

proxy:
build:
context: ../../openslides-proxy
target: "dev"
args:
CONTEXT: "dev"
image: openslides-proxy-dev
depends_on:
- client
Expand All @@ -185,6 +244,11 @@ services:
- "8025:8025" # web ui to check mails manually

vote:
build:
context: ../../openslides-vote-service
target: "dev"
args:
CONTEXT: "dev"
image: openslides-vote-dev
depends_on:
- auth
Expand Down
22 changes: 11 additions & 11 deletions dev/scripts/co-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set_remote() {
}

verify_branch() {
git fetch $REMOTE_NAME
git fetch "$REMOTE_NAME"
git rev-parse --verify remotes/"$REMOTE_NAME"/"$BRANCH_NAME" &>/dev/null || BRANCH_NAME=main
}

Expand All @@ -35,8 +35,8 @@ pull_latest_commit() {
git checkout "$REMOTE_NAME/$BRANCH_NAME"
else
echo "git checkout $BRANCH_NAME && git pull --ff-only $REMOTE_NAME $BRANCH_NAME ..."
git checkout "$BRANCH_NAME" &&
git pull --ff-only "$REMOTE_NAME" "$BRANCH_NAME" || {
{ git checkout "$BRANCH_NAME" &&
git pull --ff-only "$REMOTE_NAME" "$BRANCH_NAME"; } || {
echo "ERROR: make sure a local branch $BRANCH_NAME exists and can be fast-forwarded to $REMOTE_NAME"
exit 1
}
Expand All @@ -46,10 +46,10 @@ pull_latest_commit() {
run_switch () {
# First check for changes and stash them if wanted.
echo "Check for changes..."
if [[ `git status --porcelain --ignore-submodules --untracked-files=no` ]]; then
if [[ $(git status --porcelain --ignore-submodules --untracked-files=no) ]]; then
echo "The repository $mod has changes. Stash them? [y/n]"
read decision
if [ $decision == "y" ]; then
read -r decision
if [ "$decision" == "y" ]; then
git stash
else
exit 0
Expand All @@ -59,10 +59,10 @@ run_switch () {
(
echo "Check for changes..."
cd "$mod"
if [[ `git status --porcelain` ]]; then
if [[ $(git status --porcelain) ]]; then
echo "The repository $mod has changes. Stash them? [y/n]"
read decision
if [ $decision == "y" ]; then
read -r decision
if [ "$decision" == "y" ]; then
git stash
else
exit 0
Expand All @@ -88,8 +88,8 @@ if [ $# -eq 0 ]; then
usage
echo ""
echo "Do you want to want to proceed with branch main in remote ${REMOTE_NAME}? [y/n]"
read sw
if [ $sw == "y" ]; then
read -r sw
if [ "$sw" == "y" ]; then
run_switch
fi
exit 0
Expand Down
2 changes: 1 addition & 1 deletion dev/scripts/db.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cd "$(dirname $0)"
cd "$(dirname "$0")" || exit 1
docker compose -f ../docker/docker-compose.dev.yml exec datastore-writer psql postgresql://openslides:openslides@postgres/openslides
4 changes: 2 additions & 2 deletions dev/scripts/dc-dev.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cd "$(dirname $0)"
docker compose -f ../docker/docker-compose.dev.yml $@
cd "$(dirname "$0")" || exit 1
docker compose -f ../docker/docker-compose.dev.yml "$@"
Loading
Loading