Compare commits

...
10 Commits
Author SHA1 Message Date
Michal Klos 4c08cf6662 poc: ocis github actions steps 2026-04-23 10:34:57 +02:00
Michal Klos dd988f75bb poc: ocis github actions steps 2026-04-22 21:13:32 +02:00
Michal Klos 19cbc76486 poc: ocis github actions steps 2026-04-22 21:13:32 +02:00
Michal Klos 6a64bcb9e9 feat: drop drone 2026-04-22 21:13:32 +02:00
Michal Klos b043ac3783 feat: drop drone
# Conflicts:
#	.drone.env
#	.drone.star
#	.github/CODEOWNERS
#	.github/release_template.md
#	.github/workflows/acceptance-tests.yml
#	.gitignore
#	Makefile
#	README.md
#	docs/Makefile
#	docs/ocis/build-docs.md
#	docs/ocis/development/continuous-integration.md
#	docs/ocis/releasing_guide/releasing_guide.md
#	docs/services/general-info/add-translations.md
#	docs/services/general-info/new-service-checklist.md
#	docs/services/web/releasing.md
#	tests/acceptance/run-e2e.py
#	tests/config/drone/check_web_cache.sh
2026-04-22 21:13:31 +02:00
Michal Klos 7ecef0cd4e feat: bump dependencies
# Conflicts:
#	go.mod
#	go.sum
#	vendor/modules.txt
2026-04-22 20:59:26 +02:00
Michal Klos 8a1e35145c feat: bump dependencies
# Conflicts:
#	go.mod
#	go.sum
#	vendor/modules.txt
2026-04-22 20:51:54 +02:00
Michal Klos 20769287ce feat: bump dependencies
# Conflicts:
#	go.mod
#	go.sum
#	vendor/modules.txt
2026-04-22 20:46:07 +02:00
Michal Klos 88addae544 feat: drop drone 2026-04-22 20:45:41 +02:00
Michal Klos bd93f6a971 feat: drop drone 2026-04-22 20:45:41 +02:00
42 changed files with 698 additions and 4165 deletions

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
# The test runner source for UI tests
WEB_COMMITID=6165b4e47a47e3a216107e96f90825190f10632e
WEB_BRANCH=stable-12.3
-4091
View File
File diff suppressed because it is too large. Load diff
-1
View File
@@ -1,4 +1,3 @@
services/settings/ @lukashirt
services/web/ @lukashirt
.drone.star @kobergj @phil-davis @individual-it
assets/End-User-License-Agreement-for-ownCloud-Infinite-Scale.pdf @kobergj @hodyroff
+233
View File
@@ -0,0 +1,233 @@
name: ocis-setup
description: Start an oCIS instance with optional services (antivirus, email, tika, ociswrapper)
inputs:
ocis-version:
description: oCIS release version (e.g. 8.0.1) or "latest" — ignored when ocis-binary is set
required: false
default: latest
ocis-binary:
description: Path to a pre-built oCIS binary; skips download when provided
required: false
default: ""
admin-password:
description: Admin user password
required: false
default: admin
log-level:
description: oCIS log level
required: false
default: error
demo-users:
description: Create demo users (IDM_CREATE_DEMO_USERS=true)
required: false
default: "false"
wrapper:
description: Start ociswrapper on :5200 for dynamic reconfiguration
required: false
default: "true"
tika:
description: Start Apache Tika on :9998 for full-text search
required: false
default: "false"
email:
description: Start Mailpit SMTP (:1025) and API (:8025)
required: false
default: "false"
antivirus:
description: Start ClamAV on :3310 and enable postprocessing
required: false
default: "false"
extra-server-env:
description: JSON object of additional env vars to pass to the oCIS server
required: false
default: "{}"
outputs:
ocis-url:
description: oCIS instance URL
value: https://localhost:9200
runs:
using: composite
steps:
# -------------------------------------------------------------------------
# 1. Install oCIS binary (skip when a pre-built binary is provided)
# -------------------------------------------------------------------------
- name: Install oCIS binary from release
if: inputs.ocis-binary == ''
shell: bash
env:
OCIS_VERSION: ${{ inputs.ocis-version }}
run: ${{ github.action_path }}/scripts/install-ocis.sh
- name: Use pre-built oCIS binary
if: inputs.ocis-binary != ''
shell: bash
run: |
sudo cp "${{ inputs.ocis-binary }}" /usr/local/bin/ocis
sudo chmod +x /usr/local/bin/ocis
echo "Using pre-built oCIS: $(ocis --version 2>&1 | head -1)"
# -------------------------------------------------------------------------
# 2. Build ociswrapper (always — it is always used as the process launcher)
# -------------------------------------------------------------------------
- name: Build ociswrapper from source (when using release binary)
if: inputs.ocis-binary == ''
shell: bash
env:
OCIS_VERSION: ${{ inputs.ocis-version }}
run: ${{ github.action_path }}/scripts/install-wrapper.sh
- name: Build ociswrapper from local source (when using pre-built binary)
if: inputs.ocis-binary != ''
shell: bash
working-directory: ${{ github.workspace }}/tests/ociswrapper
run: |
GOWORK=off go build -o /tmp/ociswrapper .
sudo mv /tmp/ociswrapper /usr/local/bin/ociswrapper
echo "ociswrapper built from local source."
# -------------------------------------------------------------------------
# 3. Optional services
# -------------------------------------------------------------------------
- name: Start Mailpit (email)
if: inputs.email == 'true'
shell: bash
run: |
docker run -d --name mailpit --network host axllent/mailpit:v1.22.3
timeout 60 bash -c 'until curl -sf http://localhost:8025/api/v1/messages; do sleep 1; done'
echo "mailpit ready."
- name: Start ClamAV (antivirus)
if: inputs.antivirus == 'true'
shell: bash
run: |
docker run -d --name clamav --network host owncloudci/clamavd
echo "Waiting for ClamAV on :3310 (may take up to 5 min for virus DB download)..."
timeout 300 bash -c '
while true; do
if (echo "" | nc -z localhost 3310) 2>/dev/null || \
python3 -c "import socket,sys; s=socket.create_connection((\"localhost\",3310),2); s.close()" 2>/dev/null; then
break
fi
sleep 2
done
'
echo "clamav ready."
- name: Start Tika (full-text search)
if: inputs.tika == 'true'
shell: bash
run: |
docker run -d --name tika --network host apache/tika:3.2.2.0-full
timeout 120 bash -c 'until curl -sf http://localhost:9998; do sleep 2; done'
echo "tika ready."
# -------------------------------------------------------------------------
# 4. Install test-runner dependencies (must happen before oCIS starts —
# apt-get pulls in libcurl4-openssl-dev which replaces the system libcurl
# and would kill the running oCIS process if installed afterwards)
# -------------------------------------------------------------------------
- name: Install libcurl 8.12.0 build dependencies
shell: bash
run: |
sudo apt-get update -qq
sudo NEEDRESTART_MODE=a apt-get install -y \
libssl-dev libnghttp2-dev libpsl-dev libldap-dev libssh-dev zlib1g-dev libvips-dev
- name: Cache libcurl 8.12.0
id: cache-libcurl
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: /opt/libcurl
key: libcurl-8.12.0-${{ runner.os }}
- name: Compile libcurl 8.12.0 from source
if: steps.cache-libcurl.outputs.cache-hit != 'true'
shell: bash
run: |
cd /tmp
curl -sLO https://curl.se/download/curl-8.12.0.tar.gz
tar xzf curl-8.12.0.tar.gz
cd curl-8.12.0
./configure --with-ssl --with-zlib --with-nghttp2 --prefix=/opt/libcurl \
--enable-versioned-symbols --silent
make -j$(nproc) --silent
sudo make install --silent
- name: Restore libcurl ldconfig
shell: bash
run: |
echo "/opt/libcurl/lib" | sudo tee /etc/ld.so.conf.d/libcurl-8.conf
sudo ldconfig
/opt/libcurl/bin/curl --version | head -1
php -r '
$v = curl_version()["version"];
echo "PHP curl: $v\n";
if (version_compare($v, "8.12.0", "<")) {
fwrite(STDERR, "FATAL: PHP sees libcurl $v, need >= 8.12.0\n");
exit(1);
}
'
- name: Install Composer dependencies
shell: bash
working-directory: ${{ github.workspace }}
run: |
COMPOSER_NO_INTERACTION=1 COMPOSER_NO_AUDIT=1 composer install --no-progress
COMPOSER_NO_INTERACTION=1 COMPOSER_NO_AUDIT=1 \
composer bin behat install --no-progress
# -------------------------------------------------------------------------
# 6. Init oCIS + copy config files
# -------------------------------------------------------------------------
- name: Init oCIS
shell: bash
env:
OCIS_ACTION_PATH: ${{ github.action_path }}
run: ${{ github.action_path }}/scripts/init-ocis.sh
# -------------------------------------------------------------------------
# 7. Start oCIS via ociswrapper
# -------------------------------------------------------------------------
- name: Start oCIS
shell: bash
env:
ADMIN_PASSWORD: ${{ inputs.admin-password }}
LOG_LEVEL: ${{ inputs.log-level }}
DEMO_USERS: ${{ inputs.demo-users }}
ANTIVIRUS_ENABLED: ${{ inputs.antivirus }}
EMAIL_ENABLED: ${{ inputs.email }}
TIKA_ENABLED: ${{ inputs.tika }}
EXTRA_SERVER_ENV: ${{ inputs.extra-server-env }}
OCIS_REPO_ROOT: ${{ github.workspace }}
run: ${{ github.action_path }}/scripts/start-ocis.sh
# -------------------------------------------------------------------------
# 8. Wait for oCIS to be healthy
# -------------------------------------------------------------------------
- name: Wait for oCIS
shell: bash
run: |
echo "Waiting for oCIS at https://localhost:9200..."
timeout 300 bash -c '
until curl -sk -uadmin:admin https://localhost:9200/graph/v1.0/users/admin \
-w "%{http_code}" -o /dev/null 2>/dev/null | grep -q "200"; do
sleep 2
done
' || (echo "=== oCIS failed to start ===" && \
cat /tmp/ocis-server.log 2>/dev/null | tail -50 && exit 1)
echo "ocis ready."
# -------------------------------------------------------------------------
# 9. Stop oCIS (always runs — cleans up PID and log on both success and failure)
# -------------------------------------------------------------------------
- name: Stop oCIS
if: always()
shell: bash
run: |
if [[ -f /tmp/ocis-wrapper.pid ]]; then
kill "$(cat /tmp/ocis-wrapper.pid)" 2>/dev/null || true
rm -f /tmp/ocis-wrapper.pid /tmp/ocis-server.log
fi
@@ -0,0 +1,9 @@
app_registry:
mimetypes:
- mime_type: application/vnd.oasis.opendocument.text
extension: odt
name: OpenDocument
description: OpenDocument text document
icon: ""
default_app: FakeOffice
allow_creation: true
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail
# Initialize oCIS config directory and copy required config files.
# OCIS_ACTION_PATH: path to the action directory (contains config/)
# The action is used from within a repo checkout so GITHUB_WORKSPACE is set.
CONFIG_DIR="${HOME}/.ocis/config"
mkdir -p "$CONFIG_DIR"
ocis init --insecure true
# app-registry.yaml: bundled with this action so it works without a repo checkout
cp "${OCIS_ACTION_PATH}/config/app-registry.yaml" "${CONFIG_DIR}/app-registry.yaml"
echo "oCIS config initialized at ${CONFIG_DIR}"
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
# OCIS_VERSION: "latest" or a specific version like "8.0.1"
VERSION="${OCIS_VERSION:-latest}"
if [[ "$VERSION" == "latest" ]]; then
VERSION=$(curl -s https://api.github.com/repos/owncloud/ocis/releases/latest \
| python3 -c "import sys,json; print(json.load(sys.stdin)['tag_name'].lstrip('v'))")
fi
# Write resolved version so install-wrapper.sh uses the same tag without a second API call.
echo "$VERSION" > /tmp/ocis-resolved-version
echo "Installing oCIS $VERSION..."
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH_SUFFIX="amd64" ;;
aarch64) ARCH_SUFFIX="arm64" ;;
*) echo "Unsupported arch: $ARCH"; exit 1 ;;
esac
BASE_URL="https://github.com/owncloud/ocis/releases/download/v${VERSION}"
BINARY="ocis-${VERSION}-linux-${ARCH_SUFFIX}"
curl -sLo /tmp/ocis "${BASE_URL}/${BINARY}"
curl -sLo /tmp/ocis.sha256 "${BASE_URL}/${BINARY}.sha256"
# sha256 file contains "HASH filename" — rewrite to match our local path
HASH=$(awk '{print $1}' /tmp/ocis.sha256)
echo "${HASH} /tmp/ocis" | sha256sum -c -
chmod +x /tmp/ocis
sudo mv /tmp/ocis /usr/local/bin/ocis
echo "oCIS $(ocis --version 2>&1 | head -1) installed."
+34
View File
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail
# ociswrapper is not published as a release artifact.
# Sparse-clone only tests/ociswrapper/ from the matching tag and build it.
VERSION="${OCIS_VERSION:-latest}"
if [[ "$VERSION" == "latest" ]]; then
if [[ -f /tmp/ocis-resolved-version ]]; then
VERSION=$(cat /tmp/ocis-resolved-version)
else
VERSION=$(curl -s https://api.github.com/repos/owncloud/ocis/releases/latest \
| python3 -c "import sys,json; print(json.load(sys.stdin)['tag_name'].lstrip('v'))")
fi
fi
CLONE_DIR="/tmp/ocis-src-wrapper"
rm -rf "$CLONE_DIR"
echo "Sparse-cloning ociswrapper from tag v${VERSION}..."
git clone --depth=1 --filter=blob:none --sparse \
--branch "v${VERSION}" \
https://github.com/owncloud/ocis.git "$CLONE_DIR"
cd "$CLONE_DIR"
git sparse-checkout set tests/ociswrapper
cd tests/ociswrapper
echo "Building ociswrapper..."
GOWORK=off go build -o /tmp/ociswrapper .
sudo mv /tmp/ociswrapper /usr/local/bin/ociswrapper
echo "ociswrapper installed at $(which ociswrapper)"
rm -rf "$CLONE_DIR"
+137
View File
@@ -0,0 +1,137 @@
#!/usr/bin/env bash
set -euo pipefail
# Start oCIS via ociswrapper.
# ociswrapper wraps the ocis binary and exposes HTTP API on :5200
# for dynamic reconfiguration (env var changes at runtime).
#
# Environment variables set by action.yml:
# ADMIN_PASSWORD, LOG_LEVEL, DEMO_USERS
# ANTIVIRUS_ENABLED, EMAIL_ENABLED, TIKA_ENABLED
# EXTRA_SERVER_ENV (JSON object)
# OCIS_REPO_ROOT (GITHUB_WORKSPACE — needed for config file paths)
OCIS_URL="https://localhost:9200"
CONFIG_DIR="${HOME}/.ocis/config"
# Generate a throw-away fontsMap.json pointing at the font shipped in the repo.
# Tests that render thumbnails from text files need this.
REPO_ROOT="${OCIS_REPO_ROOT:-${GITHUB_WORKSPACE}}"
FONT_PATH="${REPO_ROOT}/tests/config/drone/NotoSans.ttf"
FONTMAP=$(mktemp /tmp/fontsMap-XXXXXX.json)
echo "{\"defaultFont\": \"${FONT_PATH}\"}" > "$FONTMAP"
declare -A SERVER_ENV=(
[OCIS_URL]="$OCIS_URL"
[OCIS_CONFIG_DIR]="$CONFIG_DIR"
[STORAGE_USERS_DRIVER]="ocis"
[PROXY_ENABLE_BASIC_AUTH]="true"
[OCIS_LOG_LEVEL]="${LOG_LEVEL:-error}"
[IDM_CREATE_DEMO_USERS]="${DEMO_USERS:-false}"
[IDM_ADMIN_PASSWORD]="${ADMIN_PASSWORD:-admin}"
[FRONTEND_SEARCH_MIN_LENGTH]="2"
[OCIS_ASYNC_UPLOADS]="true"
[OCIS_EVENTS_ENABLE_TLS]="false"
[NATS_NATS_HOST]="0.0.0.0"
[NATS_NATS_PORT]="9233"
[MICRO_REGISTRY_ADDRESS]="127.0.0.1:9233"
[OCIS_JWT_SECRET]="some-ocis-jwt-secret"
[EVENTHISTORY_STORE]="memory"
[OCIS_TRANSLATION_PATH]="${REPO_ROOT}/tests/config/translations"
[WEB_UI_CONFIG_FILE]="${REPO_ROOT}/tests/config/drone/ocis-config.json"
[THUMBNAILS_TXT_FONTMAP_FILE]="$FONTMAP"
[SEARCH_EXTRACTOR_TYPE]="basic"
[FRONTEND_FULL_TEXT_SEARCH_ENABLED]="false"
# debug addresses
[ACTIVITYLOG_DEBUG_ADDR]="0.0.0.0:9197"
[APP_PROVIDER_DEBUG_ADDR]="0.0.0.0:9165"
[APP_REGISTRY_DEBUG_ADDR]="0.0.0.0:9243"
[AUTH_BASIC_DEBUG_ADDR]="0.0.0.0:9147"
[AUTH_MACHINE_DEBUG_ADDR]="0.0.0.0:9167"
[AUTH_SERVICE_DEBUG_ADDR]="0.0.0.0:9198"
[CLIENTLOG_DEBUG_ADDR]="0.0.0.0:9260"
[EVENTHISTORY_DEBUG_ADDR]="0.0.0.0:9270"
[FRONTEND_DEBUG_ADDR]="0.0.0.0:9141"
[GATEWAY_DEBUG_ADDR]="0.0.0.0:9143"
[GRAPH_DEBUG_ADDR]="0.0.0.0:9124"
[GROUPS_DEBUG_ADDR]="0.0.0.0:9161"
[IDM_DEBUG_ADDR]="0.0.0.0:9239"
[IDP_DEBUG_ADDR]="0.0.0.0:9134"
[INVITATIONS_DEBUG_ADDR]="0.0.0.0:9269"
[NATS_DEBUG_ADDR]="0.0.0.0:9234"
[OCDAV_DEBUG_ADDR]="0.0.0.0:9163"
[OCM_DEBUG_ADDR]="0.0.0.0:9281"
[OCS_DEBUG_ADDR]="0.0.0.0:9114"
[POSTPROCESSING_DEBUG_ADDR]="0.0.0.0:9255"
[PROXY_DEBUG_ADDR]="0.0.0.0:9205"
[SEARCH_DEBUG_ADDR]="0.0.0.0:9224"
[SETTINGS_DEBUG_ADDR]="0.0.0.0:9194"
[SHARING_DEBUG_ADDR]="0.0.0.0:9151"
[SSE_DEBUG_ADDR]="0.0.0.0:9139"
[STORAGE_PUBLICLINK_DEBUG_ADDR]="0.0.0.0:9179"
[STORAGE_SHARES_DEBUG_ADDR]="0.0.0.0:9156"
[STORAGE_SYSTEM_DEBUG_ADDR]="0.0.0.0:9217"
[STORAGE_USERS_DEBUG_ADDR]="0.0.0.0:9159"
[THUMBNAILS_DEBUG_ADDR]="0.0.0.0:9189"
[USERLOG_DEBUG_ADDR]="0.0.0.0:9214"
[USERS_DEBUG_ADDR]="0.0.0.0:9145"
[WEB_DEBUG_ADDR]="0.0.0.0:9104"
[WEBDAV_DEBUG_ADDR]="0.0.0.0:9119"
[WEBFINGER_DEBUG_ADDR]="0.0.0.0:9279"
)
# Antivirus
if [[ "${ANTIVIRUS_ENABLED:-false}" == "true" ]]; then
SERVER_ENV[ANTIVIRUS_SCANNER_TYPE]="clamav"
SERVER_ENV[ANTIVIRUS_CLAMAV_SOCKET]="tcp://localhost:3310"
SERVER_ENV[POSTPROCESSING_STEPS]="virusscan"
SERVER_ENV[OCIS_ADD_RUN_SERVICES]="antivirus"
SERVER_ENV[ANTIVIRUS_DEBUG_ADDR]="0.0.0.0:9277"
fi
# Email (notifications service)
if [[ "${EMAIL_ENABLED:-false}" == "true" ]]; then
SERVER_ENV[OCIS_ADD_RUN_SERVICES]="${SERVER_ENV[OCIS_ADD_RUN_SERVICES]:+${SERVER_ENV[OCIS_ADD_RUN_SERVICES]},}notifications"
SERVER_ENV[NOTIFICATIONS_SMTP_HOST]="localhost"
SERVER_ENV[NOTIFICATIONS_SMTP_PORT]="1025"
SERVER_ENV[NOTIFICATIONS_SMTP_INSECURE]="true"
SERVER_ENV[NOTIFICATIONS_SMTP_SENDER]="ownCloud <noreply@example.com>"
SERVER_ENV[NOTIFICATIONS_DEBUG_ADDR]="0.0.0.0:9174"
fi
# Tika (full-text search)
if [[ "${TIKA_ENABLED:-false}" == "true" ]]; then
SERVER_ENV[FRONTEND_FULL_TEXT_SEARCH_ENABLED]="true"
SERVER_ENV[SEARCH_EXTRACTOR_TYPE]="tika"
SERVER_ENV[SEARCH_EXTRACTOR_TIKA_TIKA_URL]="http://localhost:9998"
SERVER_ENV[SEARCH_EXTRACTOR_CS3SOURCE_INSECURE]="true"
fi
# Extra env vars from JSON input — use null-delimited records to handle values with '=' or newlines
if [[ -n "${EXTRA_SERVER_ENV:-}" && "${EXTRA_SERVER_ENV}" != "{}" ]]; then
while IFS=$'\x01' read -r -d $'\x00' key val; do
SERVER_ENV["$key"]="$val"
done < <(echo "$EXTRA_SERVER_ENV" | python3 -c "
import sys, json
d = json.load(sys.stdin)
for k, v in d.items():
sys.stdout.buffer.write(k.encode() + b'\x01' + v.encode() + b'\x00')
")
fi
# Build env for the subprocess
ENV_ARGS=()
for key in "${!SERVER_ENV[@]}"; do
ENV_ARGS+=("${key}=${SERVER_ENV[$key]}")
done
echo "Starting ociswrapper + oCIS server..."
env "${ENV_ARGS[@]}" ociswrapper serve \
--bin /usr/local/bin/ocis \
--url "$OCIS_URL" \
--admin-username admin \
--admin-password "${ADMIN_PASSWORD:-admin}" \
> /tmp/ocis-server.log 2>&1 &
echo $! > /tmp/ocis-wrapper.pid
echo "ociswrapper started (PID $(cat /tmp/ocis-wrapper.pid)), log: /tmp/ocis-server.log"
+44
View File
@@ -0,0 +1,44 @@
name: ocis-test
description: Run oCIS Behat acceptance tests against a running oCIS instance
inputs:
suite:
description: Behat suite(s) to run, comma-separated (e.g. apiGraph or apiAntivirus,apiSettings)
required: true
ocis-url:
description: oCIS instance URL
required: false
default: https://localhost:9200
expected-failures-file:
description: Path to expected failures markdown (relative to repo root)
required: false
default: ""
acceptance-test-type:
description: Test type passed as ACCEPTANCE_TEST_TYPE (api or core-api)
required: false
default: api
with-remote-php:
description: Include remote.php expected failures (WITH_REMOTE_PHP)
required: false
default: "false"
runs:
using: composite
steps:
- name: Run ${{ inputs.suite }}
shell: bash
working-directory: ${{ github.workspace }}
env:
BEHAT_SUITES: ${{ inputs.suite }}
TEST_SERVER_URL: ${{ inputs.ocis-url }}
OCIS_WRAPPER_URL: http://localhost:5200
ACCEPTANCE_TEST_TYPE: ${{ inputs.acceptance-test-type }}
WITH_REMOTE_PHP: ${{ inputs.with-remote-php }}
EXPECTED_FAILURES_FILE: ${{ inputs.expected-failures-file }}
STORAGE_DRIVER: ocis
UPLOAD_DELETE_WAIT_TIME: "0"
EMAIL_HOST: localhost
EMAIL_PORT: "8025"
# Filter tags mirror run-github.py logic
BEHAT_FILTER_TAGS: ${{ inputs.acceptance-test-type == 'core-api' && '~@skipOnGraph&&~@skipOnOcis-OCIS-Storage' || '~@skip&&~@skipOnGraph&&~@skipOnOcis-OCIS-Storage' }}
run: make test-acceptance-api
-1
View File
@@ -8,7 +8,6 @@
* [ ] DEV/QA: Check new strings and align with clients
* [ ] DEV/DOCS: Create list of pending docs tasks
* [ ] DEV: Create branch `release-x.x.x-rc.x` -> CODEFREEZE
* [ ] DEV: specify if it is a production release in [.drone.star](https://github.com/owncloud/ocis/blob/b4cf38fa1ba180c58519026dfe762b7c45695466/.drone.star#L8) (if needed)
* [ ] DEV: bump ocis version in necessary files
* [ ] DEV: `changelog/CHANGELOG.tmpl`
* [ ] DEV: `ocis-pkg/version/version.go`
+44 -4
View File
@@ -2,6 +2,8 @@ name: Acceptance Tests
on:
pull_request:
paths-ignore:
- .github/actions/**
workflow_dispatch:
jobs:
@@ -219,7 +221,7 @@ jobs:
fail-fast: false
matrix:
suite:
- cliCommands,apiServiceAvailability # grouped like drone; needs ClamAV + email
- cliCommands,apiServiceAvailability # grouped: both need ClamAV + email services
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
@@ -375,7 +377,7 @@ jobs:
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/ms-playwright
key: playwright-chromium-${{ hashFiles('.drone.env') }}
key: playwright-chromium-${{ hashFiles('ci.env') }}
# --- Tika (search suite only) ---
- name: Start Tika
@@ -409,7 +411,8 @@ jobs:
- name: Start Keycloak
if: matrix.keycloak == true
run: |
# Patch realm: replace Drone Docker hostname with localhost IP
# Patch realm: ocis-ci-realm.dist.json uses ocis-server:9200 as hostname.
# GitHub Actions runs on the host network so patch it to 127.0.0.1.
sed 's|https://ocis-server:9200|https://127.0.0.1:9200|g' \
tests/config/drone/ocis-ci-realm.dist.json > /tmp/ocis-realm.json
docker run -d --name keycloak --network host \
@@ -493,8 +496,45 @@ jobs:
- name: Run WOPI validator (cs3)
run: python3 tests/acceptance/run-wopi.py --type cs3
# Validate that the ocis-setup + ocis-test composite actions work in this repo.
composite-actions-apiGraph:
name: composite-actions-apiGraph
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: "8.4"
extensions: curl, xml, mbstring, zip, ldap, gd
tools: composer
- name: Build oCIS from source
run: |
make ci-node-generate
make -C ocis build
- name: Setup oCIS
uses: ./.github/actions/ocis-setup
with:
ocis-binary: ocis/bin/ocis
- name: Test apiGraph
uses: ./.github/actions/ocis-test
with:
suite: apiGraph
all-acceptance-tests:
needs: [local-api-tests, cli-tests, core-api-tests, litmus, cs3api, wopi-builtin, wopi-cs3, e2e-tests]
needs: [local-api-tests, cli-tests, core-api-tests, litmus, cs3api, wopi-builtin, wopi-cs3, e2e-tests, composite-actions-apiGraph]
runs-on: ubuntu-latest
if: always()
steps:
@@ -0,0 +1,40 @@
name: Composite Actions Test
on:
workflow_dispatch:
jobs:
composite-actions-apiGraph:
name: composite-actions-apiGraph
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: "8.4"
extensions: curl, xml, mbstring, zip, ldap, gd
tools: composer
- name: Build oCIS from source
run: |
make ci-node-generate
make -C ocis build
- name: Setup oCIS
uses: ./.github/actions/ocis-setup
with:
ocis-binary: ocis/bin/ocis
- name: Test apiGraph
uses: ./.github/actions/ocis-test
with:
suite: apiGraph
-2
View File
@@ -45,8 +45,6 @@ vendor-php
# QA activity reports
tests/qa-activity-report/reports/
# drone CI is in .drone.star, do not let someone accidentally commit a local .drone.yml
.drone.yml
**/l10n/template.pot
+4 -5
View File
@@ -20,7 +20,6 @@ L10N_MODULES := \
services/userlog \
services/settings
# if you add a module here please also add it to the .drone.star file
OCIS_MODULES = \
services/activitylog \
services/antivirus \
@@ -206,7 +205,10 @@ docs-serve:
docs-clean:
@$(MAKE) --no-print-directory -C docs docs-clean
# imitate a full drone run locally to build docs without pushing to the web.
# docs-local imitates the 3-step docs build pipeline (generate → copy → build)
# locally without pushing. docs-hugo-drone-prep creates the ../hugo symlink required by
# the Hugo Docker image (hugomods/hugo:base-0.129.0).
# imitate a full docs build run locally without pushing to the web.
# this can help identify uncaught issues when running `make docs-serve` only.
.PHONY: docs-local # run all steps as drone would do it (1, 2, 3)
docs-local:
@@ -365,9 +367,6 @@ l10n-write:
$(MAKE) -C $$extension l10n-write || exit 1; \
done
.PHONY: ci-format
ci-format: $(BUILDIFIER)
$(BUILDIFIER) --mode=fix .drone.star
.PHONY: test-php-style
test-php-style: vendor-bin/owncloud-codestyle/vendor vendor-bin/php_codesniffer/vendor
+1 -1
View File
@@ -1,7 +1,7 @@
# ownCloud Infinite Scale
[![Matrix](https://img.shields.io/matrix/ocis%3Amatrix.org?logo=matrix)](https://app.element.io/#/room/#ocis:matrix.org)
[![Build Status](https://drone.owncloud.com/api/badges/owncloud/ocis/status.svg)](https://drone.owncloud.com/owncloud/ocis)
[![Build Status](https://github.com/owncloud/ocis/actions/workflows/acceptance-tests.yml/badge.svg)](https://github.com/owncloud/ocis/actions/workflows/acceptance-tests.yml)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=owncloud_ocis&metric=security_rating)](https://sonarcloud.io/dashboard?id=owncloud_ocis)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=owncloud_ocis&metric=coverage)](https://sonarcloud.io/dashboard?id=owncloud_ocis)
[![Acceptance Test Coverage](https://sonarcloud.io/api/project_badges/measure?project=owncloud-1_ocis_acceptance-tests&metric=coverage)](https://sonarcloud.io/summary/new_code?id=owncloud-1_ocis_acceptance-tests)
+4
View File
@@ -0,0 +1,4 @@
# Pins the ownCloud Web frontend version used in CI tests.
# Read by: tests/acceptance/run-e2e.py and .github/workflows/acceptance-tests.yml (Playwright cache key).
WEB_COMMITID=6165b4e47a47e3a216107e96f90825190f10632e
WEB_BRANCH=stable-12.3
+2 -1
View File
@@ -37,7 +37,8 @@ help:
.PHONY:list
list: help
# for drone only. drone uses an image for hugo that needs the hugo folder in the root
# Creates a symlink ../hugo → hugo/ required by the Hugo Docker image
# (hugomods/hugo:base-0.129.0), which expects the hugo folder at the repo root.
# CURDIR will work for make only but not when running manually in the shell
.PHONY: docs-hugo-drone-prep
docs-hugo-drone-prep:
+2 -2
View File
@@ -15,7 +15,7 @@ The documentation:
* Is based on the [HUGO](https://gohugo.io/) framework written in Go. The underlaying language is markdown plus the extensions provided by hugo.
* The framwork including the theme used is maintained in the following [repo](https://github.com/owncloud/owncloud.github.io).
* The hugo version, currently at `0.129.0` must match the image version defined in the root makefile and the framework repo, defined in `.drone.yml`.\
* The hugo version, currently at `0.129.0` must match the image version defined in the root makefile and the framework repo.\
{{< hint info >}}
* Building the theme is part of the loaded framework while building the documentation is done using a separate container.
@@ -24,7 +24,7 @@ The documentation:
* The documentation sources are distributed over several repos such as `ocis`, `web` and others. When building, these sources act individually and only those sources are build and pushed to the web that come from the respective repo. The definition what is going where is defined in the [framework repo](https://github.com/owncloud/owncloud.github.io/blob/main/.batchfile). This means, each merge of a docs change in one of the sourcing repos only pushes that change to the site. There is no global build process and inter doc links must be treated therefore very carefully !
* The documentation setup is, with only a few exceptions, identical for both the `ocis` and the `web` repo. This means, for example, running commands locally are the same, the documentation process section below applies for both; only drone uses some specifics.
* The documentation setup is, with only a few exceptions, identical for both the `ocis` and the `web` repo. This means, for example, running commands locally are the same, the documentation process section below applies for both.
* {{< hint info >}}
Any files or folders that need to be excluded from the build process must be defined in the referenced framework repository above, in the file `config.yaml`.
+17 -18
View File
@@ -9,48 +9,47 @@ geekdocFilePath: continuous-integration.md
{{< toc >}}
oCIS uses [DRONE](https://www.drone.io/) as CI system. You can find the pipeline logs [here](https://drone.owncloud.com/owncloud/ocis) or in your PR.
## Overview
oCIS uses [GitHub Actions](https://github.com/owncloud/ocis/actions) as its CI system. Pipeline logs are visible directly in pull requests.
## Concepts
The pipeline is defined in [Starlark](https://github.com/bazelbuild/starlark) and transformed to YAML upon pipeline run. This enables us to do a highly dynamic and non repeating pipeline configuration. We enforce Starlark format guidelines with Bazel Buildifier. You can format the .drone.star file by running `make ci-format`.
Pipelines are defined in `.github/workflows/`. The main acceptance test workflow is `.github/workflows/acceptance-tests.yml`.
Upon running the pipeline, your branch gets merged to the master branch. This ensures that we always test your changeset if as it was applied to the master of oCIS. Please note that this does not apply to the pipeline definition (`.drone.star`).
Upon running the pipeline, tests run against the branch as-is. Make sure your branch is rebased onto the latest master before running CI to avoid false failures.
## Things done in CI
- static code analysis
- linting
- running UI tests
- running ownCloud 10 test suite against oCIS
- running API acceptance tests
- build and release docker images
- build and release binaries
- build and release documentation
## Flags in commit message and PR title
You may add flags to your commit message or PR title in order to speed up pipeline runs and take load from the CI runners.
You may add flags to your commit message or PR title to control pipeline runs.
- `[CI SKIP]`: no CI is run on the commit or PR
- `[full-ci]`: deactivates the fail early mechanism and runs all available test (as default only smoke tests are run)
- `[full-ci]`: deactivates the fail-early mechanism and runs all available tests (by default only smoke tests run)
### Knowledge base
- My pipeline fails because some CI related files or commands are missing.
Please make sure to rebase your branch onto the latest master of oCIS. It could be that the pipeline definition (`.drone.star`) was changed on the master branch. This is the only file, that will not be auto merged to master upon pipeline run. So things could be out of sync.
Make sure your branch is rebased onto the latest master. Workflow files in `.github/workflows/` change over time and a stale branch may reference steps or configs that no longer exist.
- How can I see the YAML drone pipeline definition?
- How can I see what a workflow does?
In order to see the Yaml pipeline definition you can use the drone-cli to convert the Starlark file.
Workflow definitions are plain YAML in `.github/workflows/`. Open the relevant file directly in the repo — no CLI tool needed. The main acceptance test entry point is `.github/workflows/acceptance-tests.yml`.
- How can I re-run a failed job?
In the GitHub Actions UI, click **Re-run jobs** → **Re-run failed jobs** on the failed workflow run. You can also trigger a full re-run from `gh`:
```bash
gh run rerun <run-id> --failed --repo owncloud/ocis
```
drone starlark
```
{{< hint info >}}
If you experience a `"build" struct has no .title attribute` you need a newer version of drone-cli.
You currently need to build it yourself from this [source code](https://github.com/drone/drone-cli). If you are not using master as source, please ensure that this [PR](https://github.com/drone/drone-cli/pull/175) is included.
{{< /hint >}}
+1 -4
View File
@@ -108,10 +108,7 @@ https://owncloud.dev/ocis/releasing_guide/
* [ ] Create orphan branch: `git checkout --orphan docs-stable-7.2`
* [ ] Initial commit: `git commit --allow-empty -m "initial commit"`
* [ ] Push it: `git push`
* [ ] Adjust the `.drone.star` file to write to `docs-stable-7.2`
* [ ] Find target_branch value in the docs section and change it to `docs-stable-7.2`
* [ ] Example: https://github.com/owncloud/ocis/blame/56f7645f0b11c9112e15ce46f6effd2fea01d6be/.drone.star#L2249
* [ ] Add `stable-7.2` to the nightly cron jobs in drone (`Settings` -> `Cron Jobs`)
* [ ] Add `stable-7.2` to the nightly cron jobs in GitHub Actions (`Settings` -> `Schedules`)
```
### Steps for Patch Releases Only
@@ -16,12 +16,7 @@ Services can have texts that need to be translated. These translations will be s
The process for _synchronisation_ with Transifex is already setup and nothing needs to be done here. For any translation, it is necessary to set it up in the respective service and tell to sync it.
**IMPORTANT**\
Translations are automatically synced on a daily basis in the night. To do so, there is an own repo that covers the process for ALL translations from all configured repos: [translation-sync](https://github.com/owncloud/translation-sync). If there is a manual "emergency" sync necessary, you only need to trigger [drone](https://drone.owncloud.com/owncloud/translation-sync) via cli
```bash
drone cron exec owncloud/translation-sync nightly
```
Note that you need to be logged on in drone to execute the command.
Translations are automatically synced on a daily basis in the night. To do so, there is an own repo that covers the process for ALL translations from all configured repos: [translation-sync](https://github.com/owncloud/translation-sync). If there is a manual "emergency" sync necessary, trigger the workflow manually via the [GitHub Actions UI](https://github.com/owncloud/translation-sync/actions) using `workflow_dispatch`.
## Implementing ocis Translations
@@ -36,7 +36,7 @@ Use this checklist with copy/paste in your PR - right from the beginning. It ren
- Add the service config to `ocis-pkg/config/defaultconfig.go`
- [ ] If the service is using service accounts, add it to `ocis/pkg/init/init.go`
- [ ] Check that the service properly responds to `ocis <service-name> health` and has `/healthz` and `/readyz` endpoints
- [ ] Add the service to `.drone.star` to enable CI.
- [ ] Add the service suite to the GitHub Actions matrix in `.github/workflows/acceptance-tests.yml` to enable CI.
- [ ] Inform doc team in an *early stage* to review the readme AND the environment variables created.
- The description must reflect the behaviour AND usually has a positive code quality impact.
- [ ] Create proper description strings for envvars - see other services for examples, especially when it comes to multiple values. This must include:
+1 -1
View File
@@ -32,6 +32,6 @@ and take note of its release tag name.
2. Change into web package folder via `cd web`
3. Inside `web/`, update the `Makefile` so that the WEB_ASSETS_VERSION variable references the currently released version of https://github.com/owncloud/web
4. Move to the changelog (`cd ../changelog/`) and add a changelog file to the `unreleased/` folder (You can copy an old web release changelog item as a template)
5. Move to the repo root (`cd ..`)and update the WEB_COMMITID in the `/.drone.env` file to the commit id from the released version (unless the existing commit id is already newer)
5. Move to the repo root (`cd ..`) and update the `WEB_COMMITID` in `/ci.env` to the commit id from the released version (unless the existing commit id is already newer)
6. **Optional:** Test the changes locally by running `cd ocis && go run cmd/ocis/main.go server`, visiting [https://localhost:9200](https://localhost:9200) and confirming everything renders correctly
7. Commit your changes, push them and [create a PR](https://github.com/owncloud/ocis/pulls)
+1 -1
View File
@@ -96,7 +96,7 @@ require (
go.opentelemetry.io/otel/trace v1.43.0
golang.org/x/crypto v0.50.0
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
golang.org/x/image v0.38.0
golang.org/x/image v0.39.0
golang.org/x/net v0.53.0
golang.org/x/oauth2 v0.36.0
golang.org/x/sync v0.20.0
+2 -2
View File
@@ -1039,8 +1039,8 @@ golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aI
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
golang.org/x/image v0.38.0 h1:5l+q+Y9JDC7mBOMjo4/aPhMDcxEptsX+Tt3GgRQRPuE=
golang.org/x/image v0.38.0/go.mod h1:/3f6vaXC+6CEanU4KJxbcUZyEePbyKbaLoDOe4ehFYY=
golang.org/x/image v0.39.0 h1:skVYidAEVKgn8lZ602XO75asgXBgLj9G/FE3RbuPFww=
golang.org/x/image v0.39.0/go.mod h1:sIbmppfU+xFLPIG0FoVUTvyBMmgng1/XAMhQ2ft0hpA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+1 -1
View File
@@ -17,7 +17,7 @@ services:
EMAIL_HOST: email
EMAIL_PORT: 8025
env_file:
- ../../../../.drone.env
- ../../../../ci.env
volumes:
- ./run-tests.sh:/test/run-tests.sh
- ../../../../:/drone/src
+3
View File
@@ -1,4 +1,7 @@
#!/bin/bash
# DRONE: Hardcodes /drone/src as the repo root (Drone workspace mount point).
# Lines 3-4 (commented out) and line 15 reference this path.
# When migrating: replace /drone/src with the appropriate env var or argument.
#mkdir -p /drone/src/vendor-bin/behat
#cp /tmp/vendor-bin/behat/composer.json /drone/src/vendor-bin/behat/composer.json
+1 -2
View File
@@ -2,7 +2,6 @@
"""
Run CS3 API validator tests locally and in GitHub Actions CI.
Config sourced from .drone.star cs3ApiTests() — single source of truth.
Usage: python3 tests/acceptance/run-cs3api.py
"""
@@ -15,7 +14,7 @@ import time
from pathlib import Path
# ---------------------------------------------------------------------------
# Constants (mirroring .drone.star)
# Constants
# ---------------------------------------------------------------------------
# HTTPS — matching drone: ocis init generates a self-signed cert; proxy uses TLS by default.
+7 -7
View File
@@ -73,15 +73,15 @@ def main() -> int:
# clone + install web only if not already provided (e.g. via artifact)
if not web_dir.exists():
drone_env = {}
drone_env_file = repo_root / ".drone.env"
if drone_env_file.exists():
for line in drone_env_file.read_text().splitlines():
ci_env = {}
ci_env_file = repo_root / "ci.env"
if ci_env_file.exists():
for line in ci_env_file.read_text().splitlines():
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1)
drone_env[k.strip()] = v.strip()
web_branch = drone_env.get("WEB_BRANCH", "master")
web_commitid = drone_env.get("WEB_COMMITID", "")
ci_env[k.strip()] = v.strip()
web_branch = ci_env.get("WEB_BRANCH", "master")
web_commitid = ci_env.get("WEB_COMMITID", "")
run(["git", "clone", "-b", web_branch, "--single-branch", "--no-tags",
WEB_REPO, str(web_dir)])
if web_commitid:
+1 -2
View File
@@ -2,7 +2,6 @@
"""
Run ocis acceptance tests locally and in GitHub Actions CI.
Config sourced from .drone.star localApiTests — single source of truth.
Usage: BEHAT_SUITES=apiGraph python3 tests/acceptance/run-github.py
"""
@@ -17,7 +16,7 @@ import shutil
from pathlib import Path
# ---------------------------------------------------------------------------
# Config sourced from .drone.star
# NOTE: EMAIL_SMTP_HOST is "email" (container name) in drone, "localhost" here
# ---------------------------------------------------------------------------
+1 -2
View File
@@ -2,7 +2,6 @@
"""
Run litmus WebDAV compliance tests locally and in GitHub Actions CI.
Config sourced from .drone.star litmus() / setupForLitmus() — single source of truth.
Usage: python3 tests/acceptance/run-litmus.py
"""
@@ -17,7 +16,7 @@ import time
from pathlib import Path
# ---------------------------------------------------------------------------
# Constants (mirroring .drone.star)
# Constants
# ---------------------------------------------------------------------------
# HTTPS — matching drone: ocis init generates a self-signed cert; proxy uses TLS by default.
+1 -2
View File
@@ -2,7 +2,6 @@
"""
Run WOPI validator tests locally and in GitHub Actions CI.
Config sourced from .drone.star wopiValidatorTests() — single source of truth.
Usage: python3 tests/acceptance/run-wopi.py --type builtin
python3 tests/acceptance/run-wopi.py --type cs3
"""
@@ -21,7 +20,7 @@ import urllib.parse
from pathlib import Path
# ---------------------------------------------------------------------------
# Constants (mirroring .drone.star)
# Constants
# ---------------------------------------------------------------------------
# HTTPS — matching drone; host-side curl calls use -k.
+1
View File
@@ -677,6 +677,7 @@ then
${RED_COLOR}; printf "%s\n" "${UNEXPECTED_BEHAT_EXIT_STATUSES[@]}"
fi
# DRONE: Dead code — workarounds for Drone log-flushing issues. Kept as archaeology.
# # sync the file-system so all output will be flushed to storage.
# # In drone we sometimes see that the last lines of output are missing from the
# # drone log.
+4
View File
@@ -1,4 +1,8 @@
#!/usr/bin/env bash
# DRONE: Checks S3 MinIO cache for Go binary artifacts (.bingo tools).
# Defaults root path to /drone/src (Drone workspace mount point).
# Exit code 78 is the Drone "skip pipeline without failure" signal.
# Used by .drone.star get-go-bin-cache pipeline step.
#
# $1 - root path where .bingo resides
+3 -1
View File
@@ -1,5 +1,7 @@
#!/bin/bash
source .drone.env
# Checks S3 MinIO cache for web test runner artifacts (acceptance/e2e/web).
# Sources ci.env to get WEB_COMMITID used as the cache key.
source ci.env
# if no $1 is supplied end the script
# Can be web, acceptance or e2e
@@ -1,4 +1,8 @@
#!/bin/sh
# DRONE: Serves a fake WOPI hosting discovery XML response on port 8080.
# Hardcodes /drone/src as the repo root (Drone workspace mount point).
# Used by .drone.star wopiValidatorTests pipeline step for FakeOffice WOPI testing.
# When migrating: replace /drone/src with the appropriate path or an env var.
while true; do
echo -e "HTTP/1.1 200 OK\n\n$(cat /drone/src/tests/config/drone/hosting-discovery.xml)" | nc -l -k -p 8080
+1 -1
View File
@@ -25,7 +25,7 @@ prepare-charts:
@test -d "$(CHART_REPO)" || git clone --single-branch -b main --depth 1 https://github.com/owncloud/ocis-charts.git $(CHART_REPO)
bash setup.sh $(CHART_REPO)
kubectl create namespace $(DOMAIN) || true
kubectl create configmap -n $(DOMAIN) ocis-fonts-ttf --from-file=../drone/NotoSans.ttf || true
kubectl create configmap -n $(DOMAIN) ocis-fonts-ttf --from-file=../drone/NotoSans.ttf || true # DRONE: NotoSans.ttf lives in tests/config/drone/ — move if that directory is removed
.PHONY: deploy-ocis
deploy-ocis:
+19
View File
@@ -0,0 +1,19 @@
kind: pipeline
name: default
workspace:
base: /go
path: src/github.com/RoaringBitmap/roaring
steps:
- name: test
image: golang
commands:
- go get -t
- go test
- go build -tags appengine
- go test -tags appengine
- GOARCH=386 go build
- GOARCH=386 go test
- GOARCH=arm go build
- GOARCH=arm64 go build
+14 -2
View File
@@ -214,8 +214,9 @@ func u32(b []byte) uint32 {
// copying from the source to a caller-supplied buffer, and instead provide
// direct access to the underlying []byte data.
type source struct {
b []byte
r io.ReaderAt
b []byte
r io.ReaderAt
minSize int // r is known to contain at least minSize bytes
// TODO: add a caching layer, if we're using the io.ReaderAt? Note that
// this might make a source no longer safe to use concurrently.
@@ -255,6 +256,17 @@ func (s *source) view(buf []byte, offset, length int) ([]byte, error) {
return s.b[offset : offset+length], nil
}
if end := offset + length; end > s.minSize && length > 1<<20 {
// We're reading more than 1MiB, and we don't know whether
// the file contains this data. Check that the data exists
// before we try to allocate.
var oneByte [1]byte
if n, err := s.r.ReadAt(oneByte[:], int64(end)-1); err != nil || n != 1 {
return nil, errInvalidBounds
}
s.minSize = end
}
// Read from the io.ReaderAt.
if length <= cap(buf) {
buf = buf[:length]
+6
View File
@@ -134,6 +134,12 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) {
wantAlpha = (buf[0] & alphaBit) != 0
widthMinusOne = uint32(buf[4]) | uint32(buf[5])<<8 | uint32(buf[6])<<16
heightMinusOne = uint32(buf[7]) | uint32(buf[8])<<8 | uint32(buf[9])<<16
if uint64(widthMinusOne+1)*uint64(heightMinusOne+1) > 1<<32-1 {
// The product of _Canvas Width_ and _Canvas Height_ MUST be
// at most 2^32 - 1.
// https://www.rfc-editor.org/rfc/rfc9649.html#section-2.7-12
return nil, image.Config{}, errInvalidFormat
}
if configOnly {
if wantAlpha {
return nil, image.Config{
+1 -1
View File
@@ -2281,7 +2281,7 @@ golang.org/x/exp/slices
golang.org/x/exp/slog
golang.org/x/exp/slog/internal
golang.org/x/exp/slog/internal/buffer
# golang.org/x/image v0.38.0
# golang.org/x/image v0.39.0
## explicit; go 1.25.0
golang.org/x/image/bmp
golang.org/x/image/ccitt