Skip to content

Commit

Permalink
Merge pull request #40857 from owncloud/remove-special-drone-actions-…
Browse files Browse the repository at this point in the history
…from-ci

[CI] Remove special drone actions from ci
  • Loading branch information
phil-davis authored Jul 4, 2023
2 parents c22f8e5 + 71ca798 commit 45944fe
Showing 1 changed file with 2 additions and 56 deletions.
58 changes: 2 additions & 56 deletions .drone.star
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
ATMOZ_SFTP = "atmoz/sftp"
DRONE_CLI_ALPINE = "drone/cli:alpine"
INBUCKET_INBUCKET = "inbucket/inbucket"
MINIO_MC_RELEASE_2020_VERSION = "minio/mc:RELEASE.2020-12-10T01-26-17Z"
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_NODEJS = "owncloudci/core:nodejs14"
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 Down Expand Up @@ -542,7 +540,7 @@ def initialPipelines(ctx):
return dependencies(ctx) + checkStarlark()

def beforePipelines(ctx):
return codestyle(ctx) + changelog(ctx) + cancelPreviousBuilds() + phpstan(ctx) + phan(ctx)
return codestyle(ctx) + changelog(ctx) + phpstan(ctx) + phan(ctx)

def coveragePipelines(ctx):
# All unit test pipelines that have coverage or other test analysis reported
Expand Down Expand Up @@ -824,31 +822,6 @@ def changelog(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 @@ -1907,7 +1880,7 @@ def acceptance(ctx):
"path": "%s/downloads" % dir["server"],
}],
}),
] + githubComment(params["earlyFail"]) + stopBuild(params["earlyFail"]),
] + githubComment(params["earlyFail"]),
"services": dbServices +
browserService(browser) +
emailService(params["emailNeeded"]) +
Expand Down Expand Up @@ -2084,33 +2057,6 @@ def notify():

return result

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

else:
return []

def githubComment(earlyFail):
if (earlyFail):
return [{
Expand Down

0 comments on commit 45944fe

Please sign in to comment.