Skip to content

Commit

Permalink
Merge branch 'master' into release-2.7.2
Browse files Browse the repository at this point in the history
security updates
  • Loading branch information
jnweiger committed Aug 11, 2023
2 parents 531115b + cfbd9dd commit c2a0f76
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 127 deletions.
133 changes: 26 additions & 107 deletions .drone.star
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
BANST_AWS_CLI = "banst/awscli"
DRONE_CLI = "drone/cli:alpine"
INBUCKET_INBUCKET = "inbucket/inbucket"
MINIO_MC = "minio/mc:RELEASE.2020-12-18T10-53-53Z"
OC_CI_ALPINE = "owncloudci/alpine:latest"
OC_CI_BAZEL_BUILDIFIER = "owncloudci/bazel-buildifier"
OC_CI_CEPH = "owncloudci/ceph:tag-build-master-jewel-ubuntu-16.04"
OC_CI_CORE = "owncloudci/core"
OC_CI_DRONE_CANCEL_PREVIOUS_BUILDS = "owncloudci/drone-cancel-previous-builds"
OC_CI_DRONE_SKIP_PIPELINE = "owncloudci/drone-skip-pipeline"
OC_CI_NODEJS = "owncloudci/nodejs:%s"
OC_CI_ORACLE_XE = "owncloudci/oracle-xe:latest"
Expand All @@ -23,11 +21,26 @@ PLUGINS_SLACK = "plugins/slack:1"
SELENIUM_STANDALONE_CHROME_DEBUG = "selenium/standalone-chrome-debug:3.141.59-oxygen"
SELENIUM_STANDALONE_FIREFOX_DEBUG = "selenium/standalone-firefox-debug:3.8.1"
SONARSOURCE_SONAR_SCANNER_CLI = "sonarsource/sonar-scanner-cli"
THEGEEKLAB_DRONE_GITHUB_COMMENT = "thegeeklab/drone-github-comment:1"

DEFAULT_PHP_VERSION = "7.4"
DEFAULT_NODEJS_VERSION = "14"

# minio mc environment variables
MINIO_MC_ENV = {
"CACHE_BUCKET": {
"from_secret": "cache_s3_bucket",
},
"MC_HOST": {
"from_secret": "cache_s3_server",
},
"AWS_ACCESS_KEY_ID": {
"from_secret": "cache_s3_access_key",
},
"AWS_SECRET_ACCESS_KEY": {
"from_secret": "cache_s3_secret_key",
},
}

dir = {
"base": "/var/www/owncloud",
"federated": "/var/www/owncloud/federated",
Expand All @@ -40,7 +53,7 @@ dir = {
config = {
"rocketchat": {
"channel": "builds",
"from_secret": "private_rocketchat",
"from_secret": "rocketchat_chat_webhook",
},
"branches": [
"master",
Expand Down Expand Up @@ -207,7 +220,7 @@ def main(ctx):
return before + coverageTests + afterCoverageTests + nonCoverageTests + stages + after

def beforePipelines(ctx):
return validateDailyTarballBuild() + codestyle(ctx) + jscodestyle(ctx) + cancelPreviousBuilds() + phpstan(ctx) + phan(ctx) + phplint(ctx) + checkStarlark()
return validateDailyTarballBuild() + codestyle(ctx) + jscodestyle(ctx) + phpstan(ctx) + phan(ctx) + phplint(ctx) + checkStarlark()

def coveragePipelines(ctx):
# All unit test pipelines that have coverage or other test analysis reported
Expand Down Expand Up @@ -361,31 +374,6 @@ def jscodestyle(ctx):

return pipelines

def cancelPreviousBuilds():
return [{
"kind": "pipeline",
"type": "docker",
"name": "cancel-previous-builds",
"clone": {
"disable": True,
},
"steps": [{
"name": "cancel-previous-builds",
"image": OC_CI_DRONE_CANCEL_PREVIOUS_BUILDS,
"settings": {
"DRONE_TOKEN": {
"from_secret": "drone_token",
},
},
}],
"depends_on": [],
"trigger": {
"ref": [
"refs/pull/**",
],
},
}]

def phpstan(ctx):
pipelines = []

Expand Down Expand Up @@ -709,7 +697,7 @@ def javascript(ctx, withCoverage):
"image": PLUGINS_S3,
"settings": {
"endpoint": {
"from_secret": "cache_s3_endpoint",
"from_secret": "cache_s3_server",
},
"bucket": "cache",
"source": "./coverage/lcov.info",
Expand Down Expand Up @@ -937,7 +925,7 @@ def phpTests(ctx, testType, withCoverage):
"image": PLUGINS_S3,
"settings": {
"endpoint": {
"from_secret": "cache_s3_endpoint",
"from_secret": "cache_s3_server",
},
"bucket": "cache",
"source": "tests/output/clover-%s.xml" % (name),
Expand Down Expand Up @@ -1008,7 +996,6 @@ def acceptance(ctx):
"skip": False,
"debugSuites": [],
"skipExceptParts": [],
"earlyFail": True,
"enableApp": True,
"selUserNeeded": False,
}
Expand Down Expand Up @@ -1046,14 +1033,6 @@ def acceptance(ctx):
if params["skip"]:
continue

# switch off earlyFail if the PR title contains full-ci
if ("full-ci" in ctx.build.title.lower()):
params["earlyFail"] = False

# switch off earlyFail when running cron builds (for example, nightly CI)
if (ctx.build.event == "cron"):
params["earlyFail"] = False

if "externalScality" in params and len(params["externalScality"]) != 0:
# We want to use an external scality server for this pipeline.
# That uses some "standard" extraSetup and extraTeardown.
Expand Down Expand Up @@ -1265,7 +1244,7 @@ def acceptance(ctx):
"path": "%s/downloads" % dir["server"],
}],
}),
] + testConfig["extraTeardown"] + githubComment(params["earlyFail"]) + stopBuild(ctx, params["earlyFail"]),
] + testConfig["extraTeardown"],
"services": databaseService(testConfig["database"]) +
browserService(testConfig["browser"]) +
emailService(testConfig["emailNeeded"]) +
Expand Down Expand Up @@ -1350,13 +1329,10 @@ def sonarAnalysis(ctx, phpVersion = DEFAULT_PHP_VERSION):
{
"name": "sync-from-cache",
"image": MINIO_MC,
"environment": {
"MC_HOST_cache": {
"from_secret": "cache_s3_connection_url",
},
},
"environment": MINIO_MC_ENV,
"commands": [
"mkdir -p results",
"mc alias set cache $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
"mc mirror cache/cache/%s/%s results/" % (ctx.repo.slug, ctx.build.commit + "-${DRONE_BUILD_NUMBER}"),
],
},
Expand All @@ -1381,12 +1357,9 @@ def sonarAnalysis(ctx, phpVersion = DEFAULT_PHP_VERSION):
{
"name": "purge-cache",
"image": MINIO_MC,
"environment": {
"MC_HOST_cache": {
"from_secret": "cache_s3_connection_url",
},
},
"environment": MINIO_MC_ENV,
"commands": [
"mc alias set cache $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
"mc rm --recursive --force cache/cache/%s/%s" % (ctx.repo.slug, ctx.build.commit + "-${DRONE_BUILD_NUMBER}"),
],
},
Expand Down Expand Up @@ -1718,7 +1691,7 @@ def cacheRestore():
"from_secret": "cache_s3_access_key",
},
"endpoint": {
"from_secret": "cache_s3_endpoint",
"from_secret": "cache_s3_server",
},
"restore": True,
"secret_key": {
Expand Down Expand Up @@ -2098,60 +2071,6 @@ def buildTestConfig(params):
configs.append(config)
return configs

def stopBuild(ctx, earlyFail):
if (earlyFail):
return [{
"name": "stop-build",
"image": DRONE_CLI,
"environment": {
"DRONE_SERVER": "https://drone.owncloud.com",
"DRONE_TOKEN": {
"from_secret": "drone_token",
},
},
"commands": [
"drone build stop owncloud/%s ${DRONE_BUILD_NUMBER}" % ctx.repo.name,
],
"when": {
"status": [
"failure",
],
"event": [
"pull_request",
],
},
}]

else:
return []

def githubComment(earlyFail):
if (earlyFail):
return [{
"name": "github-comment",
"image": THEGEEKLAB_DRONE_GITHUB_COMMENT,
"pull": "if-not-exists",
"settings": {
"message": ":boom: Acceptance tests pipeline <strong>${DRONE_STAGE_NAME}</strong> failed. The build has been cancelled.\\n\\n${DRONE_BUILD_LINK}/${DRONE_JOB_NUMBER}${DRONE_STAGE_NUMBER}",
"key": "pr-${DRONE_PULL_REQUEST}",
"update": "true",
"api_key": {
"from_secret": "github_token",
},
},
"when": {
"status": [
"failure",
],
"event": [
"pull_request",
],
},
}]

else:
return []

def checkStarlark():
return [{
"kind": "pipeline",
Expand Down
3 changes: 3 additions & 0 deletions l10n/pl_PL.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ OC.L10N.register(
"Load more activities" : "Załaduj więcej aktywności",
", " : ", ",
"{parameterList} and {lastParameter}" : "{parameterList} i {lastParameter}",
"_{parameterList} and {linkStart}%n more{linkEnd}_::_{parameterList} and {linkStart}%n more{linkEnd}_" : ["{parameterList} i {linkStart}%n więcej{linkEnd}","{parameterList} i {linkStart}%n więcej{linkEnd}","{parameterList} i {linkStart}%n więcej{linkEnd}","{parameterList} i {linkStart}%n więcej{linkEnd}"],
"in {directory}" : "w {directory}",
"This stream will show events like additions, changes & shares" : "Ten strumień pokaże informacje o dodatkach, zmianachi udostępnieniach",
"There are no events for this filter" : "Nie ma zdarzeń dla tych filtrów",
Expand All @@ -26,8 +27,10 @@ OC.L10N.register(
"Hello %s," : "Witaj %s,",
"You are receiving this email because the following things happened at %s" : "Otrzymujesz tę wiadomość, ponieważ w chmurze %s miały miejsce następujące aktywności:",
"* %1$s - %2$s" : "* %1$s - %2$s",
"_* and %n more _::_* and %n more _" : ["* i %n więcej ","* i %n więcej ","* i %n więcej ","* i %n więcej "],
"You are receiving this email because the following things happened at <a href=\"%s\">%s</a>" : "Otrzymałeś tą wiadomość ponieważ zaszły następujące zdarzenia na <a href=\"%s\">%s</a>",
"%1$s - %2$s" : "%1$s - %2$s",
"_and %n more _::_and %n more _" : ["i %n więcej","i %n więcej","i %n więcej","i %n więcej"],
"Activity" : "Aktywność",
"List your own file actions in the stream" : "Wyświetl Twoje czynności w strumieniu",
"Notify about your own actions via email" : "Powiadamiaj mnie o moich aktywnościach przez email",
Expand Down
3 changes: 3 additions & 0 deletions l10n/pl_PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"Load more activities" : "Załaduj więcej aktywności",
", " : ", ",
"{parameterList} and {lastParameter}" : "{parameterList} i {lastParameter}",
"_{parameterList} and {linkStart}%n more{linkEnd}_::_{parameterList} and {linkStart}%n more{linkEnd}_" : ["{parameterList} i {linkStart}%n więcej{linkEnd}","{parameterList} i {linkStart}%n więcej{linkEnd}","{parameterList} i {linkStart}%n więcej{linkEnd}","{parameterList} i {linkStart}%n więcej{linkEnd}"],
"in {directory}" : "w {directory}",
"This stream will show events like additions, changes & shares" : "Ten strumień pokaże informacje o dodatkach, zmianachi udostępnieniach",
"There are no events for this filter" : "Nie ma zdarzeń dla tych filtrów",
Expand All @@ -24,8 +25,10 @@
"Hello %s," : "Witaj %s,",
"You are receiving this email because the following things happened at %s" : "Otrzymujesz tę wiadomość, ponieważ w chmurze %s miały miejsce następujące aktywności:",
"* %1$s - %2$s" : "* %1$s - %2$s",
"_* and %n more _::_* and %n more _" : ["* i %n więcej ","* i %n więcej ","* i %n więcej ","* i %n więcej "],
"You are receiving this email because the following things happened at <a href=\"%s\">%s</a>" : "Otrzymałeś tą wiadomość ponieważ zaszły następujące zdarzenia na <a href=\"%s\">%s</a>",
"%1$s - %2$s" : "%1$s - %2$s",
"_and %n more _::_and %n more _" : ["i %n więcej","i %n więcej","i %n więcej","i %n więcej"],
"Activity" : "Aktywność",
"List your own file actions in the stream" : "Wyświetl Twoje czynności w strumieniu",
"Notify about your own actions via email" : "Powiadamiaj mnie o moich aktywnościach przez email",
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,10 @@
"karma-jasmine-sinon": "^1.0.4",
"karma-phantomjs-launcher": "*"
},
"resolutions": {
"minimist": "0.2.4",
"json-schema": "0.4.0",
"qs": "6.7.3"
},
"engine": "node >= 0.8"
}
32 changes: 12 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,10 @@ json-schema-traverse@^0.4.1:
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==

[email protected]:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
[email protected], [email protected]:
version "0.4.0"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5"
integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==

json-stringify-safe@~5.0.1:
version "5.0.1"
Expand Down Expand Up @@ -840,14 +841,10 @@ minimatch@^3.0.4:
dependencies:
brace-expansion "^1.1.7"

[email protected]:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"

minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
[email protected], [email protected], minimist@^1.2.5:
version "0.2.4"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.2.4.tgz#0085d5501e29033748a2f2a4da0180142697a475"
integrity sha512-Pkrrm8NjyQ8yVt8Am9M+yUt74zE3iokhzbG1bFVNjLB92vwM71hf40RkEsryg98BujhVOncKm/C1xROxZ030LQ==

[email protected]:
version "0.5.1"
Expand Down Expand Up @@ -991,15 +988,10 @@ qjobs@^1.2.0:
resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071"
integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==

[email protected]:
version "6.7.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==

qs@~6.5.2:
version "6.5.3"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad"
integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==
[email protected], [email protected], qs@~6.5.2:
version "6.7.3"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.3.tgz#67634d715101aa950601f58dbef353b7e1696b95"
integrity sha512-WBoQWf5L/UOLqUj8Mvr4Om7J+ZTCqPbYPHyeLNRS9t9Q3M3/o/9ctpWnlo8yyETPclx7FhH5LidjKKJa9kdSRQ==

range-parser@^1.2.1:
version "1.2.1"
Expand Down

0 comments on commit c2a0f76

Please sign in to comment.