Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions .woodpecker.env

This file was deleted.

75 changes: 0 additions & 75 deletions .woodpecker/cache-opencloud.yaml

This file was deleted.

18 changes: 3 additions & 15 deletions .woodpecker/ui-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ when:
cron: nightly*

depends_on:
- cache-opencloud
- cache-pnpm
- build

Expand Down Expand Up @@ -74,17 +73,8 @@ steps:
commands:
- tar -xvf /woodpecker/desktop/playwright-browsers.tar.gz -C .

- name: restore-opencloud-cache
image: *minio_image
environment:
<<: *minio_environment
commands:
- . ./.woodpecker.env
- mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY
- mc cp -r -a s3/$CACHE_BUCKET/opencloud-build/$OPENCLOUD_COMMITID/opencloud /woodpecker/desktop

- name: opencloud
image: docker.io/golang:1.24
image: quay.io/opencloudeu/opencloud-rolling:latest
detach: true
environment:
FRONTEND_SEARCH_MIN_LENGTH: '2'
Expand All @@ -100,10 +90,8 @@ steps:
PROXY_ENABLE_BASIC_AUTH: true
WEB_UI_CONFIG_FILE: /woodpecker/desktop/test/gui/woodpecker/config-opencloud.json
commands:
- mkdir -p /srv/app/tmp/opencloud/opencloud/data/
- mkdir -p /srv/app/tmp/opencloud/storage/users/
- ./opencloud init
- ./opencloud server
- opencloud init
- opencloud server

- name: wait-for-opencloud
image: owncloudci/alpine:latest
Expand Down
33 changes: 1 addition & 32 deletions test/gui/woodpecker/script.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,6 @@
#!/bin/bash

source .woodpecker.env

# Function to get the latest OpenCloud commit ID
get_latest_opencloud_commit_id() {
echo "Getting latest commit ID for branch: $OPENCLOUD_BRANCH"
latest_commit_id=$(git ls-remote https://github.com/opencloud-eu/opencloud.git "refs/heads/$OPENCLOUD_BRANCH" | cut -f 1)

# Update the OPENCLOUD in the .woodpecker.env file
env_file="./.woodpecker.env"
sed -i "s/^OPENCLOUD_COMMITID=.*/OPENCLOUD_COMMITID=$latest_commit_id/" "$env_file"

echo "Updated .woodpecker.env with latest commit ID: $latest_commit_id"
cat $env_file
exit 0
}

# Function to check if the cache exists for the given commit ID
check_opencloud_cache() {
echo "Checking OpenCloud cache for commit ID: $OPENCLOUD_COMMITID"
opencloud_cache=$(mc find s3/$CACHE_BUCKET/opencloud-build/$OPENCLOUD_COMMITID/opencloud 2>&1 | grep 'Object does not exist')

if [[ "$opencloud_cache" != "" ]]
then
echo "$OPENCLOUD_COMMITID doesn't exist in cache."
ENV="OPENCLOUD_CACHE_FOUND=false\n"
else
echo "$OPENCLOUD_COMMITID found in cache."
ENV="OPENCLOUD_CACHE_FOUND=true\n"
fi
}
touch .woodpecker.env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't there be a .woodpecker.env aleady? or am i just confused? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, I removed it as it doesn't contain any data. only needed during the workflow run

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it 👍


# get playwright version from package.json
get_playwright_version() {
Expand Down Expand Up @@ -80,8 +51,6 @@ check_python_cache() {
if [[ "$1" == "" ]]; then
echo "Usage: $0 [COMMAND]"
echo "Commands:"
echo -e " get_latest_opencloud_commit_id \t get the latest OpenCloud commit ID"
echo -e " check_opencloud_cache \t\t check if the cache exists for the given commit ID"
echo -e " get_playwright_version \t get the playwright version from package.json"
echo -e " check_browsers_cache \t check if the browsers cache exists for the given playwright version"
echo -e " check_python_cache \t check if a cache for the current requirements.txt exists"
Expand Down