Compare commits
196
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e126ea94bc | ||
|
|
9fc5d89bc7 | ||
|
|
d046d5e726 | ||
|
|
552941184a | ||
|
|
3e40c278a7 | ||
|
|
a2e642aead | ||
|
|
58447b3e96 | ||
|
|
2fbb6c9933 | ||
|
|
c04f3dad0d | ||
|
|
89754fd412 | ||
|
|
ef277d3267 | ||
|
|
94aee2d367 | ||
|
|
ed48814009 | ||
|
|
42e7220528 | ||
|
|
db41f46697 | ||
|
|
621ec66baf | ||
|
|
690175236c | ||
|
|
2b755c39bf | ||
|
|
204ff6574b | ||
|
|
8a1241bb3c | ||
|
|
39ef9d92e1 | ||
|
|
7678fa2f92 | ||
|
|
caecf781e3 | ||
|
|
66c1249921 | ||
|
|
a701bbc8db | ||
|
|
c262be77ec | ||
|
|
79f929236c | ||
|
|
105df0c8e4 | ||
|
|
b4f5957e71 | ||
|
|
263921591b | ||
|
|
5d1059e4ff | ||
|
|
0497062d0d | ||
|
|
23329bc86a | ||
|
|
6496fec15b | ||
|
|
69bdc34b6e | ||
|
|
7d8fe2c44d | ||
|
|
93b14bc454 | ||
|
|
0f89f2b7fd | ||
|
|
0c97d3edd0 | ||
|
|
9355cc5912 | ||
|
|
53553a9bfd | ||
|
|
315f52328d | ||
|
|
f8e5175df5 | ||
|
|
077e56e2c7 | ||
|
|
624f681ce6 | ||
|
|
214491134f | ||
|
|
4a57e98780 | ||
|
|
c443dc68a0 | ||
|
|
f47c387133 | ||
|
|
4e1e529ef0 | ||
|
|
4decd85767 | ||
|
|
4722b63514 | ||
|
|
c74c8d31f3 | ||
|
|
6c246fb56d | ||
|
|
d661296c04 | ||
|
|
a10cfe188d | ||
|
|
5f89a7de98 | ||
|
|
b77ef1a4b2 | ||
|
|
8b846ca1c8 | ||
|
|
63121b7f37 | ||
|
|
f6bd1ad16e | ||
|
|
10c189d86c | ||
|
|
87c3384ab1 | ||
|
|
4ab23b0df5 | ||
|
|
6446f513bb | ||
|
|
14db9274c8 | ||
|
|
58c3caae07 | ||
|
|
c6aab01486 | ||
|
|
dc5b59688d | ||
|
|
f2f558bfa7 | ||
|
|
380435aab4 | ||
|
|
482591ecd1 | ||
|
|
48ab941943 | ||
|
|
4537755ca0 | ||
|
|
47a593766b | ||
|
|
f06d683b70 | ||
|
|
887f41cc3b | ||
|
|
3812f50eba | ||
|
|
959695e8fe | ||
|
|
b35314fb0a | ||
|
|
9b90219a2d | ||
|
|
7756ab9a66 | ||
|
|
2a6b1de60f | ||
|
|
3a1988c351 | ||
|
|
472650d41d | ||
|
|
5a86cf03b2 | ||
|
|
a9bce7c4e3 | ||
|
|
3de2be5caa | ||
|
|
447967b985 | ||
|
|
67f86499ef | ||
|
|
8b9dcc6a84 | ||
|
|
9d02a5a291 | ||
|
|
e97b4592aa | ||
|
|
ed4c69fabd | ||
|
|
b2a4e806c5 | ||
|
|
a85e174c35 | ||
|
|
31e1d03a38 | ||
|
|
e10d5822bb | ||
|
|
b95f4a05cf | ||
|
|
1128490ba0 | ||
|
|
698f9ba93d | ||
|
|
81bac5e97f | ||
|
|
dfb53fc52b | ||
|
|
a2d4db4ae0 | ||
|
|
bc5ab41402 | ||
|
|
a4eb34628f | ||
|
|
328579186a | ||
|
|
819cf505f8 | ||
|
|
86ec03dac5 | ||
|
|
0eeee16b1d | ||
|
|
0da7a4c668 | ||
|
|
743b10c323 | ||
|
|
d72e21bf2b | ||
|
|
6f327cc2ae | ||
|
|
7992a495eb | ||
|
|
af437186fc | ||
|
|
2f2f4d574d | ||
|
|
c75d47a75d | ||
|
|
62b7f45026 | ||
|
|
df545583d1 | ||
|
|
ce92021fea | ||
|
|
caa83ab952 | ||
|
|
be983bb96b | ||
|
|
e3c48f164a | ||
|
|
b74af1e785 | ||
|
|
dff6990e15 | ||
|
|
08c6f41fc8 | ||
|
|
a544de75c4 | ||
|
|
8e0f3b9e1c | ||
|
|
f54a6e424d | ||
|
|
dd3ad75c00 | ||
|
|
e6894474be | ||
|
|
032f5afd58 | ||
|
|
5d41175b12 | ||
|
|
ff856b3f30 | ||
|
|
b07925a927 | ||
|
|
97035575c3 | ||
|
|
676e6dbcef | ||
|
|
03dd538531 | ||
|
|
f2c33fcba0 | ||
|
|
042ec41edd | ||
|
|
6df5f45c0e | ||
|
|
43f190be4d | ||
|
|
46ea8a0bc6 | ||
|
|
49c241af93 | ||
|
|
d3812a1bd6 | ||
|
|
76591e0ea3 | ||
|
|
171a4a0c85 | ||
|
|
de2a3c7444 | ||
|
|
edb9744b0a | ||
|
|
87efb6e3a9 | ||
|
|
3a2294f4fa | ||
|
|
711fe74a6c | ||
|
|
2804a42274 | ||
|
|
6fbdff282a | ||
|
|
8d1ba0244c | ||
|
|
28b95304dd | ||
|
|
47353cb198 | ||
|
|
436757fd8d | ||
|
|
91187e8706 | ||
|
|
f04be9f870 | ||
|
|
b65dbd28cd | ||
|
|
109fc22c71 | ||
|
|
f43e15fb62 | ||
|
|
9a236b15f6 | ||
|
|
d5b08881b5 | ||
|
|
56ca70c4ba | ||
|
|
470d3c5ae1 | ||
|
|
69a68ac515 | ||
|
|
2ab941dea2 | ||
|
|
9b795c085b | ||
|
|
c98e241d39 | ||
|
|
f5d9e1f8cf | ||
|
|
5eac54959d | ||
|
|
e3e3d28c9e | ||
|
|
57f85bc06a | ||
|
|
8a464c921c | ||
|
|
355f486ca1 | ||
|
|
1f06142480 | ||
|
|
51ef72532b | ||
|
|
f4b673a4e0 | ||
|
|
0e680f31e4 | ||
|
|
9bcb949813 | ||
|
|
d5acebe08a | ||
|
|
1c633f7d26 | ||
|
|
ae74e77c46 | ||
|
|
6326df1c5b | ||
|
|
91e58a31ac | ||
|
|
b81167695c | ||
|
|
8675aed596 | ||
|
|
245fb71e39 | ||
|
|
e3101b4c40 | ||
|
|
8597ca43df | ||
|
|
72bba00e53 | ||
|
|
63275b6c70 | ||
|
|
cabeda782e |
No files matched your search
+1
-1
@@ -1,3 +1,3 @@
|
||||
# The test runner source for UI tests
|
||||
WEB_COMMITID=97a5cf669626ed83acaeb2f7e8aaf542d42100c2
|
||||
WEB_COMMITID=2095462acf3163569802daef1eba0bc9b17710f4
|
||||
WEB_BRANCH=stable-8.0
|
||||
+168
-266
@@ -18,7 +18,6 @@ OC_CI_PHP = "owncloudci/php:%s"
|
||||
OC_CI_WAIT_FOR = "owncloudci/wait-for:latest"
|
||||
OC_CS3_API_VALIDATOR = "owncloud/cs3api-validator:0.2.1"
|
||||
OC_LITMUS = "owncloudci/litmus:latest"
|
||||
OC_OC_TEST_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.8.8"
|
||||
OC_UBUNTU = "owncloud/ubuntu:20.04"
|
||||
PLUGINS_CODACY = "plugins/codacy:1"
|
||||
PLUGINS_DOCKER = "plugins/docker:latest"
|
||||
@@ -30,10 +29,9 @@ PLUGINS_S3 = "plugins/s3:latest"
|
||||
PLUGINS_S3_CACHE = "plugins/s3-cache:1"
|
||||
PLUGINS_SLACK = "plugins/slack:1"
|
||||
REDIS = "redis:6-alpine"
|
||||
SELENIUM_STANDALONE_CHROME = "selenium/standalone-chrome:104.0-20220812"
|
||||
SONARSOURCE_SONAR_SCANNER_CLI = "sonarsource/sonar-scanner-cli:5.0"
|
||||
|
||||
DEFAULT_PHP_VERSION = "7.4"
|
||||
DEFAULT_PHP_VERSION = "8.2"
|
||||
DEFAULT_NODEJS_VERSION = "18"
|
||||
|
||||
dirs = {
|
||||
@@ -134,16 +132,21 @@ config = {
|
||||
"skip": False,
|
||||
"skipExceptParts": [],
|
||||
},
|
||||
"uiTests": {
|
||||
"filterTags": "@ocisSmokeTest",
|
||||
"skip": False,
|
||||
"skipExceptParts": [],
|
||||
},
|
||||
"e2eTests": {
|
||||
"skip": False,
|
||||
"basic": {
|
||||
"skip": False,
|
||||
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
|
||||
"xsuites": ["search", "app-provider"], # suites to skip
|
||||
},
|
||||
"search": {
|
||||
"skip": False,
|
||||
"suites": ["search"], # suites to run
|
||||
"tikaNeeded": True,
|
||||
},
|
||||
},
|
||||
"rocketchat": {
|
||||
"channel": "infinitescale",
|
||||
"channel": "builds",
|
||||
"channel_cron": "builds",
|
||||
"from_secret": "rocketchat_talk_webhook",
|
||||
},
|
||||
"binaryReleases": {
|
||||
@@ -237,25 +240,26 @@ def main(ctx):
|
||||
|
||||
pipelines = []
|
||||
|
||||
build_release_helpers = \
|
||||
changelog() + \
|
||||
docs() + \
|
||||
licenseCheck(ctx)
|
||||
|
||||
test_pipelines = \
|
||||
codestyle(ctx) + \
|
||||
checkTestSuitesInExpectedFailures(ctx) + \
|
||||
buildWebCache(ctx) + \
|
||||
getGoBinForTesting(ctx) + \
|
||||
[buildOcisBinaryForTesting(ctx)] + \
|
||||
buildOcisBinaryForTesting(ctx) + \
|
||||
checkStarlark() + \
|
||||
build_release_helpers + \
|
||||
testOcisAndUploadResults(ctx) + \
|
||||
testPipelines(ctx)
|
||||
|
||||
build_release_pipelines = \
|
||||
[licenseCheck(ctx)] + \
|
||||
dockerReleases(ctx) + \
|
||||
binaryReleases(ctx)
|
||||
|
||||
build_release_helpers = [
|
||||
changelog(),
|
||||
docs(),
|
||||
]
|
||||
|
||||
test_pipelines.append(
|
||||
pipelineDependsOn(
|
||||
purgeBuildArtifactCache(ctx),
|
||||
@@ -263,7 +267,7 @@ def main(ctx):
|
||||
),
|
||||
)
|
||||
|
||||
pipelines = test_pipelines + build_release_pipelines + build_release_helpers
|
||||
pipelines = test_pipelines + build_release_pipelines
|
||||
|
||||
if ctx.build.event == "cron":
|
||||
pipelines = \
|
||||
@@ -280,14 +284,13 @@ def main(ctx):
|
||||
# always append notification step
|
||||
pipelines.append(
|
||||
pipelineDependsOn(
|
||||
notify(),
|
||||
notify(ctx),
|
||||
pipelines,
|
||||
),
|
||||
)
|
||||
|
||||
pipelines = pipelines + k6LoadTests(ctx)
|
||||
|
||||
pipelines += checkStarlark()
|
||||
pipelineSanityChecks(ctx, pipelines)
|
||||
return pipelines
|
||||
|
||||
@@ -318,11 +321,19 @@ def buildWebCache(ctx):
|
||||
def testOcisAndUploadResults(ctx):
|
||||
pipeline = testOcis(ctx)
|
||||
|
||||
######################################################################
|
||||
# The triggers have been disabled for now, since the govulncheck can #
|
||||
# not silence single, acceptable vulnerabilities. #
|
||||
# See https://github.com/owncloud/ocis/issues/9527 for more details. #
|
||||
# FIXME: RE-ENABLE THIS ASAP!!! #
|
||||
######################################################################
|
||||
|
||||
scan_result_upload = uploadScanResults(ctx)
|
||||
scan_result_upload["depends_on"] = getPipelineNames([pipeline])
|
||||
|
||||
security_scan = scanOcis(ctx)
|
||||
return [pipeline, scan_result_upload, security_scan]
|
||||
#security_scan = scanOcis(ctx)
|
||||
#return [security_scan, pipeline, scan_result_upload]
|
||||
return [pipeline, scan_result_upload]
|
||||
|
||||
def testPipelines(ctx):
|
||||
pipelines = []
|
||||
@@ -340,11 +351,7 @@ def testPipelines(ctx):
|
||||
if "skip" not in config["apiTests"] or not config["apiTests"]["skip"]:
|
||||
pipelines += apiTests(ctx)
|
||||
|
||||
if "skip" not in config["uiTests"] or not config["uiTests"]["skip"]:
|
||||
pipelines += uiTests(ctx)
|
||||
|
||||
if "skip" not in config["e2eTests"] or not config["e2eTests"]["skip"]:
|
||||
pipelines += e2eTests(ctx)
|
||||
pipelines += e2eTestPipeline(ctx)
|
||||
|
||||
return pipelines
|
||||
|
||||
@@ -541,7 +548,7 @@ def scanOcis(ctx):
|
||||
}
|
||||
|
||||
def buildOcisBinaryForTesting(ctx):
|
||||
return {
|
||||
return [{
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "build_ocis_binary_for_testing",
|
||||
@@ -561,7 +568,7 @@ def buildOcisBinaryForTesting(ctx):
|
||||
],
|
||||
},
|
||||
"volumes": [pipelineVolumeGo],
|
||||
}
|
||||
}]
|
||||
|
||||
def uploadScanResults(ctx):
|
||||
sonar_env = {
|
||||
@@ -815,7 +822,7 @@ def localApiTestPipeline(ctx):
|
||||
localApiTests(suite, storage, params["extraEnvironment"]) +
|
||||
logRequests(),
|
||||
"services": emailService() if params["emailNeeded"] else [] + clamavService() if params["antivirusNeeded"] else [],
|
||||
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]),
|
||||
"depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)),
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/stable-*",
|
||||
@@ -875,7 +882,7 @@ def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
|
||||
],
|
||||
},
|
||||
],
|
||||
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]),
|
||||
"depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)),
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/stable-*",
|
||||
@@ -947,7 +954,7 @@ def wopiValidatorTests(ctx, storage, accounts_hash_difficulty = 4):
|
||||
[
|
||||
{
|
||||
"name": "wopiserver",
|
||||
"image": "cs3org/wopiserver:v10.3.0",
|
||||
"image": "cs3org/wopiserver:v10.4.0",
|
||||
"detach": True,
|
||||
"commands": [
|
||||
"cp %s/tests/config/drone/wopiserver.conf /etc/wopi/wopiserver.conf" % (dirs["base"]),
|
||||
@@ -982,7 +989,7 @@ def wopiValidatorTests(ctx, storage, accounts_hash_difficulty = 4):
|
||||
},
|
||||
] +
|
||||
validatorTests,
|
||||
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]),
|
||||
"depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)),
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/stable-*",
|
||||
@@ -1031,7 +1038,7 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac
|
||||
] +
|
||||
logRequests(),
|
||||
"services": redisForOCStorage(storage),
|
||||
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]),
|
||||
"depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)),
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/stable-*",
|
||||
@@ -1050,134 +1057,13 @@ def apiTests(ctx):
|
||||
|
||||
return pipelines
|
||||
|
||||
def uiTests(ctx):
|
||||
default = {
|
||||
"filterTags": "",
|
||||
def e2eTestPipeline(ctx):
|
||||
defaults = {
|
||||
"skip": False,
|
||||
# only used if 'full-ci' is in build title or if run by cron
|
||||
"numberOfParts": 20,
|
||||
"skipExceptParts": [],
|
||||
}
|
||||
params = {}
|
||||
pipelines = []
|
||||
|
||||
for item in default:
|
||||
params[item] = config["uiTests"][item] if item in config["uiTests"] else default[item]
|
||||
|
||||
filterTags = params["filterTags"]
|
||||
|
||||
if ("full-ci" in ctx.build.title.lower() or ctx.build.event == "cron"):
|
||||
numberOfParts = params["numberOfParts"]
|
||||
skipExceptParts = params["skipExceptParts"]
|
||||
debugPartsEnabled = (len(skipExceptParts) != 0)
|
||||
|
||||
for runPart in range(1, numberOfParts + 1):
|
||||
if (not debugPartsEnabled or (debugPartsEnabled and runPart in skipExceptParts)):
|
||||
pipelines.append(uiTestPipeline(ctx, "", runPart, numberOfParts))
|
||||
|
||||
# For ordinary PRs, always run the "minimal" UI test pipeline
|
||||
# That has its own expected-failures file, and we always want to know that it is correct,
|
||||
if (ctx.build.event != "tag"):
|
||||
pipelines.append(uiTestPipeline(ctx, filterTags, 1, 2, "ocis", "smoke"))
|
||||
pipelines.append(uiTestPipeline(ctx, filterTags, 2, 2, "ocis", "smoke"))
|
||||
|
||||
return pipelines
|
||||
|
||||
def uiTestPipeline(ctx, filterTags, runPart = 1, numberOfParts = 1, storage = "ocis", uniqueName = "", accounts_hash_difficulty = 4):
|
||||
standardFilterTags = "not @skipOnOCIS and not @skip and not @notToImplementOnOCIS and not @federated-server-needed"
|
||||
if filterTags == "":
|
||||
finalFilterTags = standardFilterTags
|
||||
expectedFailuresFileFilterTags = ""
|
||||
else:
|
||||
finalFilterTags = filterTags + " and " + standardFilterTags
|
||||
expectedFailuresFileFilterTags = "-" + filterTags.lstrip("@")
|
||||
|
||||
if uniqueName == "":
|
||||
uniqueNameString = ""
|
||||
else:
|
||||
finalFilterTags = filterTags + " and " + standardFilterTags
|
||||
uniqueNameString = "-" + uniqueName
|
||||
|
||||
if numberOfParts == 1:
|
||||
pipelineName = "Web-Tests-ocis%s-%s-storage" % (uniqueNameString, storage)
|
||||
else:
|
||||
pipelineName = "Web-Tests-ocis%s-%s-storage-%s" % (uniqueNameString, storage, runPart)
|
||||
|
||||
extra_server_environment = {
|
||||
"OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD": False,
|
||||
"OCIS_PASSWORD_POLICY_MIN_CHARACTERS": 1,
|
||||
"OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS": 0,
|
||||
"OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS": 0,
|
||||
"OCIS_PASSWORD_POLICY_MIN_DIGITS": 0,
|
||||
"OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS": 0,
|
||||
}
|
||||
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": pipelineName,
|
||||
"platform": {
|
||||
"os": "linux",
|
||||
"arch": "amd64",
|
||||
},
|
||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
|
||||
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
|
||||
restoreWebCache() +
|
||||
restoreWebPnpmCache() +
|
||||
ocisServer(storage, accounts_hash_difficulty, extra_server_environment = extra_server_environment) +
|
||||
waitForSeleniumService() +
|
||||
waitForMiddlewareService() +
|
||||
[
|
||||
{
|
||||
"name": "webUITests",
|
||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||
"environment": {
|
||||
"SERVER_HOST": "https://ocis-server:9200",
|
||||
"BACKEND_HOST": "https://ocis-server:9200",
|
||||
"OCIS_REVA_DATA_ROOT": "%s" % dirs["ocisRevaDataRoot"],
|
||||
"WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["ocisConfig"]),
|
||||
"TEST_TAGS": finalFilterTags,
|
||||
"LOCAL_UPLOAD_DIR": "/uploads",
|
||||
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
|
||||
"RUN_PART": runPart,
|
||||
"DIVIDE_INTO_NUM_PARTS": numberOfParts,
|
||||
"EXPECTED_FAILURES_FILE": "/%s/tests/acceptance/expected-failures-webUI-on-%s-storage%s.md" % (dirs["base"], storage.upper(), expectedFailuresFileFilterTags),
|
||||
"MIDDLEWARE_HOST": "http://middleware:3000",
|
||||
},
|
||||
"commands": [
|
||||
"cd %s/tests/acceptance" % dirs["web"],
|
||||
"./run.sh",
|
||||
],
|
||||
},
|
||||
],
|
||||
"services": selenium() + middlewareService(),
|
||||
"volumes": [{
|
||||
"name": "uploads",
|
||||
"temp": {},
|
||||
}],
|
||||
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)] + buildWebCache(ctx)),
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
def e2eTests(ctx):
|
||||
test_suites = {
|
||||
"suite1": {
|
||||
"path": "tests/e2e/cucumber/features/{smoke,journeys}/*.feature",
|
||||
"tikaNeeded": False,
|
||||
},
|
||||
"suite2": {
|
||||
"path": "tests/e2e/cucumber/features/smoke/{spaces,admin-settings}/*.feature",
|
||||
"tikaNeeded": False,
|
||||
},
|
||||
"suite3": {
|
||||
"path": "tests/e2e/cucumber/features/smoke/{search,shares}/*.feature",
|
||||
"tikaNeeded": True,
|
||||
},
|
||||
"suites": [],
|
||||
"xsuites": [],
|
||||
"totalParts": 0,
|
||||
"tikaNeeded": False,
|
||||
}
|
||||
|
||||
extra_server_environment = {
|
||||
@@ -1206,41 +1092,81 @@ def e2eTests(ctx):
|
||||
pipelines = []
|
||||
|
||||
if ("skip-e2e" in ctx.build.title.lower()):
|
||||
return []
|
||||
return pipelines
|
||||
|
||||
for name, suite in test_suites.items():
|
||||
steps = \
|
||||
if (ctx.build.event == "tag"):
|
||||
return pipelines
|
||||
|
||||
for name, suite in config["e2eTests"].items():
|
||||
if "skip" in suite and suite["skip"]:
|
||||
return pipelines
|
||||
|
||||
params = {}
|
||||
for item in defaults:
|
||||
params[item] = suite[item] if item in suite else defaults[item]
|
||||
|
||||
e2e_args = ""
|
||||
if params["totalParts"] > 0:
|
||||
e2e_args = "--total-parts %d" % params["totalParts"]
|
||||
elif params["suites"]:
|
||||
e2e_args = "--suites %s" % ",".join(params["suites"])
|
||||
|
||||
# suites to skip
|
||||
if params["xsuites"]:
|
||||
e2e_args += " --xsuites %s" % ",".join(params["xsuites"])
|
||||
|
||||
steps_before = \
|
||||
skipIfUnchanged(ctx, "e2e-tests") + \
|
||||
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") + \
|
||||
restoreWebCache() + \
|
||||
restoreWebPnpmCache() + \
|
||||
(tikaService() if suite["tikaNeeded"] else []) + \
|
||||
ocisServer("ocis", 4, [], extra_server_environment = extra_server_environment, tika_enabled = suite["tikaNeeded"]) + \
|
||||
[{
|
||||
"name": "e2e-tests",
|
||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||
"environment": {
|
||||
"BASE_URL_OCIS": "ocis-server:9200",
|
||||
"HEADLESS": "true",
|
||||
"RETRY": "1",
|
||||
"WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["ocisConfig"]),
|
||||
"LOCAL_UPLOAD_DIR": "/uploads",
|
||||
},
|
||||
"commands": [
|
||||
"cd %s" % dirs["web"],
|
||||
"pnpm test:e2e:cucumber %s" % suite["path"],
|
||||
],
|
||||
}] + \
|
||||
uploadTracingResult(ctx) + \
|
||||
logTracingResults()
|
||||
(tikaService() if params["tikaNeeded"] else []) + \
|
||||
ocisServer("ocis", 4, [], extra_server_environment = extra_server_environment, tika_enabled = params["tikaNeeded"])
|
||||
|
||||
if (ctx.build.event != "tag"):
|
||||
step_e2e = {
|
||||
"name": "e2e-tests",
|
||||
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
|
||||
"environment": {
|
||||
"BASE_URL_OCIS": "ocis-server:9200",
|
||||
"HEADLESS": "true",
|
||||
"RETRY": "1",
|
||||
"WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["ocisConfig"]),
|
||||
"LOCAL_UPLOAD_DIR": "/uploads",
|
||||
},
|
||||
"commands": [
|
||||
"cd %s/tests/e2e" % dirs["web"],
|
||||
],
|
||||
}
|
||||
|
||||
steps_after = uploadTracingResult(ctx) + \
|
||||
logTracingResults()
|
||||
|
||||
if params["totalParts"]:
|
||||
for index in range(params["totalParts"]):
|
||||
run_part = index + 1
|
||||
run_e2e = {}
|
||||
run_e2e.update(step_e2e)
|
||||
run_e2e["commands"] = [
|
||||
"cd %s/tests/e2e" % dirs["web"],
|
||||
"bash run-e2e.sh %s --run-part %d" % (e2e_args, run_part),
|
||||
]
|
||||
pipelines.append({
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "e2e-tests-%s-%s" % (name, run_part),
|
||||
"steps": steps_before + [run_e2e] + steps_after,
|
||||
"depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx) + buildWebCache(ctx)),
|
||||
"trigger": e2e_trigger,
|
||||
"volumes": e2e_volumes,
|
||||
})
|
||||
else:
|
||||
step_e2e["commands"].append("bash run-e2e.sh %s" % e2e_args)
|
||||
pipelines.append({
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "e2e-tests-%s" % name,
|
||||
"steps": steps,
|
||||
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)] + buildWebCache(ctx)),
|
||||
"steps": steps_before + [step_e2e] + steps_after,
|
||||
"depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx) + buildWebCache(ctx)),
|
||||
"trigger": e2e_trigger,
|
||||
"volumes": e2e_volumes,
|
||||
})
|
||||
@@ -1308,7 +1234,7 @@ def dockerReleases(ctx):
|
||||
for arch in config["dockerReleases"]["architectures"]:
|
||||
pipelines.append(dockerRelease(ctx, arch))
|
||||
|
||||
manifest = releaseDockerManifest()
|
||||
manifest = releaseDockerManifest(ctx)
|
||||
manifest["depends_on"] = getPipelineNames(pipelines)
|
||||
pipelines.append(manifest)
|
||||
|
||||
@@ -1321,7 +1247,7 @@ def dockerReleases(ctx):
|
||||
def dockerRelease(ctx, arch):
|
||||
build_args = [
|
||||
"REVISION=%s" % (ctx.build.commit),
|
||||
"VERSION=%s" % (ctx.build.ref.replace("refs/tags/", "") if ctx.build.event == "tag" else "latest"),
|
||||
"VERSION=%s" % (ctx.build.ref.replace("refs/tags/", "") if ctx.build.event == "tag" else "stable"),
|
||||
]
|
||||
depends_on = getPipelineNames(testOcisAndUploadResults(ctx) + testPipelines(ctx))
|
||||
|
||||
@@ -1562,7 +1488,7 @@ def licenseCheck(ctx):
|
||||
"target": target,
|
||||
}
|
||||
|
||||
return {
|
||||
return [{
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "check-licenses",
|
||||
@@ -1662,20 +1588,30 @@ def licenseCheck(ctx):
|
||||
],
|
||||
},
|
||||
"volumes": [pipelineVolumeGo],
|
||||
}
|
||||
}]
|
||||
|
||||
def releaseDockerManifest():
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "manifest",
|
||||
"platform": {
|
||||
"os": "linux",
|
||||
"arch": "amd64",
|
||||
def releaseDockerManifest(ctx):
|
||||
spec_latest = "manifest-latest.tmpl"
|
||||
steps = [{
|
||||
"name": "execute",
|
||||
"image": PLUGINS_MANIFEST,
|
||||
"settings": {
|
||||
"username": {
|
||||
"from_secret": "docker_username",
|
||||
},
|
||||
"password": {
|
||||
"from_secret": "docker_password",
|
||||
},
|
||||
"spec": "ocis/docker/manifest.tmpl",
|
||||
"auto_tag": True,
|
||||
"ignore_missing": True,
|
||||
},
|
||||
"steps": [
|
||||
}]
|
||||
|
||||
if len(ctx.build.ref.split("-")) == 2:
|
||||
steps.append(
|
||||
{
|
||||
"name": "execute",
|
||||
"name": "execute-latest",
|
||||
"image": PLUGINS_MANIFEST,
|
||||
"settings": {
|
||||
"username": {
|
||||
@@ -1684,12 +1620,27 @@ def releaseDockerManifest():
|
||||
"password": {
|
||||
"from_secret": "docker_password",
|
||||
},
|
||||
"spec": "ocis/docker/manifest.tmpl",
|
||||
"spec": "ocis/docker/%s" % spec_latest,
|
||||
"auto_tag": True,
|
||||
"ignore_missing": True,
|
||||
},
|
||||
},
|
||||
],
|
||||
"when": {
|
||||
"ref": [
|
||||
"refs/tags/v*",
|
||||
],
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "manifest",
|
||||
"platform": {
|
||||
"os": "linux",
|
||||
"arch": "amd64",
|
||||
},
|
||||
"steps": steps,
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/tags/v*",
|
||||
@@ -1698,7 +1649,7 @@ def releaseDockerManifest():
|
||||
}
|
||||
|
||||
def changelog():
|
||||
return {
|
||||
return [{
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "changelog",
|
||||
@@ -1764,7 +1715,7 @@ def changelog():
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
}
|
||||
}]
|
||||
|
||||
def releaseDockerReadme(ctx):
|
||||
return {
|
||||
@@ -1800,7 +1751,7 @@ def releaseDockerReadme(ctx):
|
||||
}
|
||||
|
||||
def docs():
|
||||
return {
|
||||
return [{
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "docs",
|
||||
@@ -1869,7 +1820,7 @@ def docs():
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
}
|
||||
}]
|
||||
|
||||
def makeNodeGenerate(module):
|
||||
if module == "":
|
||||
@@ -1908,7 +1859,13 @@ def makeGoGenerate(module):
|
||||
},
|
||||
]
|
||||
|
||||
def notify():
|
||||
def notify(ctx):
|
||||
status = ["failure"]
|
||||
channel = config["rocketchat"]["channel"]
|
||||
if ctx.build.event == "cron":
|
||||
status.append("success")
|
||||
channel = config["rocketchat"]["channel_cron"]
|
||||
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
@@ -1924,7 +1881,7 @@ def notify():
|
||||
"webhook": {
|
||||
"from_secret": config["rocketchat"]["from_secret"],
|
||||
},
|
||||
"channel": config["rocketchat"]["channel"],
|
||||
"channel": channel,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -1935,9 +1892,7 @@ def notify():
|
||||
"refs/heads/release*",
|
||||
"refs/tags/**",
|
||||
],
|
||||
"status": [
|
||||
"failure",
|
||||
],
|
||||
"status": status,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2029,38 +1984,6 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
|
||||
wait_for_ocis,
|
||||
]
|
||||
|
||||
def middlewareService():
|
||||
return [{
|
||||
"name": "middleware",
|
||||
"image": OC_OC_TEST_MIDDLEWARE,
|
||||
"environment": {
|
||||
"BACKEND_HOST": "https://ocis-server:9200",
|
||||
"OCIS_REVA_DATA_ROOT": "%s/storage/owncloud/" % dirs["ocis"],
|
||||
"RUN_ON_OCIS": "true",
|
||||
"HOST": "middleware",
|
||||
"REMOTE_UPLOAD_DIR": "/uploads",
|
||||
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
|
||||
"MIDDLEWARE_HOST": "middleware",
|
||||
"TEST_WITH_GRAPH_API": "true",
|
||||
},
|
||||
"volumes": [{
|
||||
"name": "uploads",
|
||||
"path": "/uploads",
|
||||
}, {
|
||||
"name": "gopath",
|
||||
"path": "/srv/app",
|
||||
}],
|
||||
}]
|
||||
|
||||
def waitForMiddlewareService():
|
||||
return [{
|
||||
"name": "wait-for-middleware-service",
|
||||
"image": OC_CI_WAIT_FOR,
|
||||
"commands": [
|
||||
"wait-for -it middleware:3000 -t 300",
|
||||
],
|
||||
}]
|
||||
|
||||
def redis():
|
||||
return [
|
||||
{
|
||||
@@ -2075,27 +1998,6 @@ def redisForOCStorage(storage = "ocis"):
|
||||
else:
|
||||
return
|
||||
|
||||
def selenium():
|
||||
return [
|
||||
{
|
||||
"name": "selenium",
|
||||
"image": SELENIUM_STANDALONE_CHROME,
|
||||
"volumes": [{
|
||||
"name": "uploads",
|
||||
"path": "/uploads",
|
||||
}],
|
||||
},
|
||||
]
|
||||
|
||||
def waitForSeleniumService():
|
||||
return [{
|
||||
"name": "wait-for-selenium-service",
|
||||
"image": OC_CI_WAIT_FOR,
|
||||
"commands": [
|
||||
"wait-for -it selenium:4444 -t 300",
|
||||
],
|
||||
}]
|
||||
|
||||
def build():
|
||||
return [
|
||||
{
|
||||
@@ -2576,7 +2478,7 @@ def litmus(ctx, storage):
|
||||
},
|
||||
],
|
||||
"services": redisForOCStorage(storage),
|
||||
"depends_on": getPipelineNames([buildOcisBinaryForTesting(ctx)]),
|
||||
"depends_on": getPipelineNames(buildOcisBinaryForTesting(ctx)),
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/stable-*",
|
||||
|
||||
+528
-480
File diff suppressed because it is too large.
Load diff
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 460 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user