diff --git a/.woodpecker.env b/.woodpecker.env deleted file mode 100644 index bc41060c0..000000000 --- a/.woodpecker.env +++ /dev/null @@ -1,3 +0,0 @@ -# The version of OpenCloud to use in pipelines -OPENCLOUD_COMMITID=2a2e882a59a19307dd99979c15d199f72450688f -OPENCLOUD_BRANCH=main diff --git a/.woodpecker/cache-opencloud.yaml b/.woodpecker/cache-opencloud.yaml deleted file mode 100644 index 6c384a426..000000000 --- a/.woodpecker/cache-opencloud.yaml +++ /dev/null @@ -1,75 +0,0 @@ -variables: - - &minio_image 'minio/mc:RELEASE.2021-10-07T04-19-58Z' - - &minio_environment - AWS_ACCESS_KEY_ID: - from_secret: cache_s3_access_key - AWS_SECRET_ACCESS_KEY: - from_secret: cache_s3_secret_key - CACHE_BUCKET: - from_secret: cache_s3_bucket - MC_HOST: 'https://s3.ci.opencloud.eu' - -when: - - branch: - - main - - stable-* - event: - - push - - manual - - event: pull_request - evaluate: | - !(CI_COMMIT_SOURCE_BRANCH matches "next-release/(main|stable-*)" && CI_COMMIT_AUTHOR == "openclouders") - - event: tag - - event: cron - cron: nightly* - -skip_clone: true - -steps: - - name: check-for-existing-cache - image: *minio_image - environment: - <<: *minio_environment - commands: - - curl -o .woodpecker.env https://raw.githubusercontent.com/opencloud-eu/desktop/$CI_COMMIT_SHA/.woodpecker.env - - curl -o script.sh https://raw.githubusercontent.com/opencloud-eu/desktop/$CI_COMMIT_SHA/test/gui/woodpecker/script.sh - - . ./.woodpecker.env - - mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY - - mc ls --recursive s3/$CACHE_BUCKET/opencloud-build - - bash script.sh check_opencloud_cache - - - name: clone-opencloud - image: docker.io/golang:1.24 - commands: - - . ./.woodpecker.env - - if $OPENCLOUD_CACHE_FOUND; then exit 0; fi - - git clone -b $OPENCLOUD_BRANCH --single-branch https://github.com/opencloud-eu/opencloud.git repo_opencloud - - cd repo_opencloud - - git checkout $OPENCLOUD_COMMITID - - - name: generate-opencloud - image: owncloudci/nodejs:20 - commands: - - . ./.woodpecker.env - - if $OPENCLOUD_CACHE_FOUND; then exit 0; fi - - cd repo_opencloud - - for i in $(seq 3); do make node-generate-prod && break || sleep 1; done - - - name: build-opencloud - image: docker.io/golang:1.24 - commands: - - . ./.woodpecker.env - - if $OPENCLOUD_CACHE_FOUND; then exit 0; fi - - cd repo_opencloud - - for i in $(seq 3); do make -C opencloud build && break || sleep 1; done - - - name: upload-opencloud-cache - image: *minio_image - environment: - <<: *minio_environment - commands: - - . ./.woodpecker.env - - if $OPENCLOUD_CACHE_FOUND; then exit 0; fi - - mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY - - mc cp -a repo_opencloud/opencloud/bin/opencloud s3/$CACHE_BUCKET/opencloud-build/$OPENCLOUD_COMMITID/ - - mc ls --recursive s3/$CACHE_BUCKET/opencloud-build diff --git a/.woodpecker/ui-tests.yaml b/.woodpecker/ui-tests.yaml index 6c139ade2..0e8dcea6a 100644 --- a/.woodpecker/ui-tests.yaml +++ b/.woodpecker/ui-tests.yaml @@ -25,7 +25,6 @@ when: cron: nightly* depends_on: - - cache-opencloud - cache-pnpm - build @@ -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' @@ -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 diff --git a/test/gui/woodpecker/script.sh b/test/gui/woodpecker/script.sh index 1b7eaeb75..d983f6c53 100644 --- a/test/gui/woodpecker/script.sh +++ b/test/gui/woodpecker/script.sh @@ -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 # get playwright version from package.json get_playwright_version() { @@ -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"