Compare commits

..

4 Commits

Author SHA1 Message Date
Saw-jan
de28c22687 ci: upload info
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
2026-01-01 18:03:15 +05:45
Saw-jan
80f4a22298 ci: upload info
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
2026-01-01 17:51:07 +05:45
Saw-jan
8039858e4f ci: add script to evaluate pipeline
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
2026-01-01 17:30:34 +05:45
Saw-jan
c55f76f931 ci: check pipeline info
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
2026-01-01 14:34:40 +05:45
3 changed files with 141 additions and 32 deletions

View File

@@ -103,13 +103,13 @@ config = {
"basic": {
"suites": [
"apiArchiver",
"apiContract",
"apiCors",
"apiAsyncUpload",
"apiDownloads",
"apiDepthInfinity",
"apiLocks",
"apiActivities",
# "apiContract",
# "apiCors",
# "apiAsyncUpload",
# "apiDownloads",
# "apiDepthInfinity",
# "apiLocks",
# "apiActivities",
],
"skip": False,
},
@@ -117,7 +117,7 @@ config = {
"suites": [
"apiSettings",
],
"skip": False,
"skip": True,
"withRemotePhp": [True],
"emailNeeded": True,
"extraTestEnvironment": {
@@ -135,7 +135,7 @@ config = {
},
"graph": {
"suites": [
"apiGraph",
# "apiGraph",
"apiServiceAvailability",
# skip tests for collaborativePosix. see https://github.com/opencloud-eu/opencloud/issues/2036
#"collaborativePosix",
@@ -147,38 +147,38 @@ config = {
"suites": [
"apiGraphUserGroup",
],
"skip": False,
"skip": True,
"withRemotePhp": [True],
},
"spaces": {
"suites": [
"apiSpaces",
],
"skip": False,
"skip": True,
},
"spacesShares": {
"suites": [
"apiSpacesShares",
],
"skip": False,
"skip": True,
},
"spacesDavOperation": {
"suites": [
"apiSpacesDavOperation",
],
"skip": False,
"skip": True,
},
"search1": {
"suites": [
"apiSearch1",
],
"skip": False,
"skip": True,
},
"search2": {
"suites": [
"apiSearch2",
],
"skip": False,
"skip": True,
},
"sharingNg": {
"suites": [
@@ -186,23 +186,23 @@ config = {
"apiSharingNg1",
"apiSharingNg2",
],
"skip": False,
"skip": True,
},
"sharingNgShareInvitation": {
"suites": [
"apiSharingNgShareInvitation",
],
"skip": False,
"skip": True,
},
"sharingNgLinkShare": {
"suites": [
"apiSharingNgLinkSharePermission",
"apiSharingNgLinkShareRoot",
],
"skip": False,
"skip": True,
},
"accountsHashDifficulty": {
"skip": False,
"skip": True,
"suites": [
"apiAccountsHashDifficulty",
],
@@ -212,7 +212,7 @@ config = {
"suites": [
"apiNotification",
],
"skip": False,
"skip": True,
"withRemotePhp": [True],
"emailNeeded": True,
"extraTestEnvironment": {
@@ -232,7 +232,7 @@ config = {
"suites": [
"apiAntivirus",
],
"skip": False,
"skip": True,
"antivirusNeeded": True,
"generateVirusFiles": True,
"extraServerEnvironment": {
@@ -248,14 +248,14 @@ config = {
"suites": [
"apiSearchContent",
],
"skip": False,
"skip": True,
"tikaNeeded": True,
},
"ocm": {
"suites": [
"apiOcm",
],
"skip": False,
"skip": True,
"withRemotePhp": [True],
"federationServer": True,
"emailNeeded": True,
@@ -281,7 +281,7 @@ config = {
"suites": [
"apiCollaboration",
],
"skip": False,
"skip": True,
"collaborationServiceNeeded": True,
"extraServerEnvironment": {
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
@@ -291,14 +291,14 @@ config = {
"suites": [
"apiAuthApp",
],
"skip": False,
"skip": True,
"withRemotePhp": [True],
},
"cliCommands": {
"suites": [
"cliCommands",
],
"skip": False,
"skip": True,
"withRemotePhp": [True],
"antivirusNeeded": True,
"generateVirusFiles": True,
@@ -314,7 +314,7 @@ config = {
"suites": [
"apiTenancy",
],
"skip": False,
"skip": True,
"withRemotePhp": [True],
"ldapNeeded": True,
"extraTestEnvironment": {
@@ -348,12 +348,12 @@ config = {
"coreApiTests": {
"numberOfParts": 7,
"skip": False,
"skipExceptParts": [],
"skipExceptParts": [1],
"storages": ["posix"],
},
"e2eTests": {
"part": {
"skip": False,
"skip": True,
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
# suites to skip
"xsuites": [
@@ -377,7 +377,7 @@ config = {
},
"e2eMultiService": {
"testSuites": {
"skip": False,
"skip": True,
"suites": [
"smoke",
"shares",
@@ -492,6 +492,8 @@ def main(ctx):
none
"""
return savePipelineNumber(ctx) + test()
if ctx.build.event == "cron" and ctx.build.sender == "translation-sync":
return translation_sync(ctx)
@@ -566,6 +568,54 @@ def main(ctx):
pipelineSanityChecks(pipelines)
return pipelines
def savePipelineNumber(ctx):
base_url = "https://raw.githubusercontent.com/%s" % repo_slug
script_link = "%s/%s/tests/config/woodpecker/upload_pipeline_info.sh" % (base_url, ctx.build.commit)
return [{
"name": "save-pipeline-info",
"skip_clone": True,
"steps": [{
"name": "upload-info",
"image": MINIO_MC,
"environment": MINIO_MC_ENV,
"commands": [
"curl -s -o upload_pipeline_info.sh %s" % script_link,
"bash -x upload_pipeline_info.sh",
],
}],
"when": [
{
"event": ["push", "manual"],
"branch": ["main", "stable-*"],
},
event["tag"],
event["cron"],
event["pull_request"],
],
}]
def test():
return [{
"name": "test-pipeline",
"steps": [{
"name": "get-previous-pipeline",
"image": OC_UBUNTU,
"commands": [
"bash -x tests/config/woodpecker/evaluate_pipeline.sh",
],
}],
"depends_on": ["save-pipeline-info"],
"when": [
{
"event": ["push", "manual"],
"branch": ["main", "stable-*"],
},
event["tag"],
event["cron"],
event["pull_request"],
],
}]
def cachePipeline(ctx, name, steps):
return {
"name": "build-%s-cache" % name,
@@ -2285,9 +2335,9 @@ def opencloudServer(storage = "decomposed", accounts_hash_difficulty = 4, depend
"%s/bin/ocwrapper serve --bin %s --url %s --admin-username admin --admin-password admin" % (dirs["ocWrapper"], dirs["opencloudBin"], environment["OC_URL"]),
]
else:
server_commands += [
server_commands.append(
"%s server" % dirs["opencloudBin"],
]
)
wait_for_opencloud = {
"name": "wait-for-%s" % container_name,

View File

@@ -0,0 +1,32 @@
#!/bin/bash
set -e
# set -x
# INFO_URL="https://s3.ci.opencloud.eu/public/$CI_REPO_NAME/pipelines/$CI_COMMIT_SHA/pipeline_info.json"
INFO_URL="https://s3.ci.opencloud.eu/public/$CI_REPO_NAME/pipelines/fcbcb3d9cc73fcd1cab49774632a92b531718a76/pipeline_info.json"
file_status=$(curl -s -o pipeline_info.json "$INFO_URL" -w "%{http_code}")
if [ "$file_status" == "404" ];
then
echo "[INFO] No matching previous pipeline found. Continue pipeline..."
exit 0
elif [ "$file_status" != "200" ];
then
echo -e "[ERROR] Failed to fetch previous pipeline info.\n URL: $INFO_URL\n Status: $file_status"
exit 1
fi
cat pipeline_info.json
overall_status=$(jq -r '.status' pipeline_info.json)
# re-run all pipelines
if [ "$overall_status" == "success" ];
then
exit 0
fi
# workflows=$(echo "$pipeline" | jq -r '.workflows[] | select(.name == "'"$CI_WORKFLOW_NAME"'")')
# echo "$CI_WORKFLOW_NAME"

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
CI_COMMIT_SHA=fcbcb3d9cc73fcd1cab49774632a92b531718a76
mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY
# check previous pipeline
URL="https://s3.ci.opencloud.eu/$PUBLIC_BUCKET/$CI_REPO_NAME/pipelines/$CI_COMMIT_SHA/prev_pipeline"
status=$(curl -s -o prev_pipeline "$URL" -w '%{http_code}')
if [ "$status" == "200" ];
then
source prev_pipeline
REPO_ID=$(printf '%s' "$CI_PIPELINE_URL" | sed 's|.*/repos/\([0-9]*\)/.*|\1|')
p_status=$(curl -s -o pipeline_info.json "$CI_SYSTEM_URL/api/repos/$REPO_ID/pipelines/$PREV_PIPELINE_NUMBER" -w "%{http_code}")
if [ "$p_status" != "200" ];
then
echo -e "[ERROR] Failed to fetch previous pipeline info.\n URL: $CI_SYSTEM_URL/api/repos/$REPO_ID/pipelines/$PREV_PIPELINE_NUMBER\n Status: $p_status"
exit 1
fi
# update previous pipeline info
mc cp -a pipeline_info.json "s3/$PUBLIC_BUCKET/$CI_REPO_NAME/pipelines/$CI_COMMIT_SHA/"
fi
# upload current as previous for next pipeline
echo "PREV_PIPELINE_NUMBER=$CI_PIPELINE_NUMBER" > prev_pipeline
mc cp -a prev_pipeline "s3/$PUBLIC_BUCKET/$CI_REPO_NAME/pipelines/$CI_COMMIT_SHA/"