meltwater cache is removed, s3_cache is used
This commit is contained in:
1 file changed
+32
-32
+32
-32
@@ -6,7 +6,6 @@ ALPINE_GIT = "alpine/git:latest"
|
|||||||
CHKO_DOCKER_PUSHRM = "chko/docker-pushrm:1"
|
CHKO_DOCKER_PUSHRM = "chko/docker-pushrm:1"
|
||||||
DRONE_CLI = "drone/cli:alpine"
|
DRONE_CLI = "drone/cli:alpine"
|
||||||
MARIADB = "mariadb:10.6"
|
MARIADB = "mariadb:10.6"
|
||||||
MELTWATER_DRONE_CACHE = "meltwater/drone-cache:v1"
|
|
||||||
MINIO_MC = "minio/mc:RELEASE.2021-10-07T04-19-58Z"
|
MINIO_MC = "minio/mc:RELEASE.2021-10-07T04-19-58Z"
|
||||||
OC_CI_ALPINE = "owncloudci/alpine:latest"
|
OC_CI_ALPINE = "owncloudci/alpine:latest"
|
||||||
OC_CI_BAZEL_BUILDIFIER = "owncloudci/bazel-buildifier:latest"
|
OC_CI_BAZEL_BUILDIFIER = "owncloudci/bazel-buildifier:latest"
|
||||||
@@ -31,6 +30,7 @@ PLUGINS_GITHUB_RELEASE = "plugins/github-release:1"
|
|||||||
PLUGINS_GIT_ACTION = "plugins/git-action:1"
|
PLUGINS_GIT_ACTION = "plugins/git-action:1"
|
||||||
PLUGINS_MANIFEST = "plugins/manifest:1"
|
PLUGINS_MANIFEST = "plugins/manifest:1"
|
||||||
PLUGINS_S3 = "plugins/s3:latest"
|
PLUGINS_S3 = "plugins/s3:latest"
|
||||||
|
PLUGINS_S3_CACHE = "plugins/s3-cache:1"
|
||||||
PLUGINS_SLACK = "plugins/slack:1"
|
PLUGINS_SLACK = "plugins/slack:1"
|
||||||
REDIS = "redis:6-alpine"
|
REDIS = "redis:6-alpine"
|
||||||
SELENIUM_STANDALONE_CHROME_DEBUG = "selenium/standalone-chrome-debug:3.141.59"
|
SELENIUM_STANDALONE_CHROME_DEBUG = "selenium/standalone-chrome-debug:3.141.59"
|
||||||
@@ -455,7 +455,7 @@ def buildOcisBinaryForTesting(ctx):
|
|||||||
makeNodeGenerate("") +
|
makeNodeGenerate("") +
|
||||||
makeGoGenerate("") +
|
makeGoGenerate("") +
|
||||||
build() +
|
build() +
|
||||||
rebuildBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis"),
|
rebuildBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin"),
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"ref": [
|
"ref": [
|
||||||
"refs/heads/master",
|
"refs/heads/master",
|
||||||
@@ -591,7 +591,7 @@ def localApiTests(ctx, storage, suite, accounts_hash_difficulty = 4):
|
|||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
},
|
},
|
||||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
|
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
|
||||||
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
|
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
|
||||||
ocisServer(storage, accounts_hash_difficulty) +
|
ocisServer(storage, accounts_hash_difficulty) +
|
||||||
restoreBuildArtifactCache(ctx, "testrunner", dirs["core"]) +
|
restoreBuildArtifactCache(ctx, "testrunner", dirs["core"]) +
|
||||||
restoreBuildArtifactCache(ctx, "testing_app", dirs["testing_app"]) +
|
restoreBuildArtifactCache(ctx, "testing_app", dirs["testing_app"]) +
|
||||||
@@ -644,7 +644,7 @@ def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
|
|||||||
"os": "linux",
|
"os": "linux",
|
||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
},
|
},
|
||||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
|
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
|
||||||
ocisServer(storage, accounts_hash_difficulty, []) + [
|
ocisServer(storage, accounts_hash_difficulty, []) + [
|
||||||
{
|
{
|
||||||
"name": "cs3ApiTests-%s" % (storage),
|
"name": "cs3ApiTests-%s" % (storage),
|
||||||
@@ -678,7 +678,7 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac
|
|||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
},
|
},
|
||||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
|
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
|
||||||
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
|
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
|
||||||
ocisServer(storage, accounts_hash_difficulty) +
|
ocisServer(storage, accounts_hash_difficulty) +
|
||||||
restoreBuildArtifactCache(ctx, "testrunner", dirs["core"]) +
|
restoreBuildArtifactCache(ctx, "testrunner", dirs["core"]) +
|
||||||
restoreBuildArtifactCache(ctx, "testing_app", dirs["testing_app"]) +
|
restoreBuildArtifactCache(ctx, "testing_app", dirs["testing_app"]) +
|
||||||
@@ -792,7 +792,7 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
|
|||||||
"os": "linux",
|
"os": "linux",
|
||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
},
|
},
|
||||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") + restoreBuildArtifactCache(ctx, "web-dist", "webTestRunner") +
|
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") + restoreBuildArtifactCache(ctx, "web-dist", "webTestRunner") +
|
||||||
restoreBuildArtifactCache(ctx, "tests-yarn", "webTestRunner/tests/acceptance/.yarn") + yarnInstallUITests() +
|
restoreBuildArtifactCache(ctx, "tests-yarn", "webTestRunner/tests/acceptance/.yarn") + yarnInstallUITests() +
|
||||||
ocisServer(storage, accounts_hash_difficulty) + waitForSeleniumService() + waitForMiddlewareService() +
|
ocisServer(storage, accounts_hash_difficulty) + waitForSeleniumService() + waitForMiddlewareService() +
|
||||||
restoreBuildArtifactCache(ctx, "testing_app", dirs["testing_app"]) +
|
restoreBuildArtifactCache(ctx, "testing_app", dirs["testing_app"]) +
|
||||||
@@ -846,7 +846,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
|
|||||||
"os": "linux",
|
"os": "linux",
|
||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
},
|
},
|
||||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
|
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
|
||||||
ocisServer(storage, accounts_hash_difficulty) + waitForSeleniumService() + waitForMiddlewareService() + [
|
ocisServer(storage, accounts_hash_difficulty) + waitForSeleniumService() + waitForMiddlewareService() + [
|
||||||
{
|
{
|
||||||
"name": "WebUIAcceptanceTests",
|
"name": "WebUIAcceptanceTests",
|
||||||
@@ -2049,31 +2049,26 @@ def genericCache(name, action, mounts, cache_key):
|
|||||||
|
|
||||||
step = {
|
step = {
|
||||||
"name": "%s_%s" % (action, name),
|
"name": "%s_%s" % (action, name),
|
||||||
"image": MELTWATER_DRONE_CACHE,
|
"image": PLUGINS_S3_CACHE,
|
||||||
"environment": {
|
|
||||||
"AWS_ACCESS_KEY_ID": {
|
|
||||||
"from_secret": "cache_s3_access_key",
|
|
||||||
},
|
|
||||||
"AWS_SECRET_ACCESS_KEY": {
|
|
||||||
"from_secret": "cache_s3_secret_key",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"endpoint": {
|
"endpoint": {
|
||||||
"from_secret": "cache_s3_endpoint",
|
"from_secret": "cache_s3_endpoint",
|
||||||
},
|
},
|
||||||
"bucket": "cache",
|
|
||||||
"region": "us-east-1", # not used at all, but fails if not given!
|
|
||||||
"path_style": "true",
|
|
||||||
"cache_key": cache_key,
|
|
||||||
"rebuild": rebuild,
|
"rebuild": rebuild,
|
||||||
"restore": restore,
|
"restore": restore,
|
||||||
"mount": mounts,
|
"mount": mounts,
|
||||||
|
"access_key": {
|
||||||
|
"from_secret": "cache_s3_access_key",
|
||||||
|
},
|
||||||
|
"secret_key": {
|
||||||
|
"from_secret": "cache_s3_secret_key",
|
||||||
|
},
|
||||||
|
"filename": "%s.tar" % (cache_key),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return step
|
return step
|
||||||
|
|
||||||
def genericCachePurge(ctx, name, cache_key):
|
def genericCachePurge(name, cache_key):
|
||||||
return {
|
return {
|
||||||
"kind": "pipeline",
|
"kind": "pipeline",
|
||||||
"type": "docker",
|
"type": "docker",
|
||||||
@@ -2085,16 +2080,21 @@ def genericCachePurge(ctx, name, cache_key):
|
|||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"name": "purge-cache",
|
"name": "purge-cache",
|
||||||
"image": MINIO_MC,
|
"image": PLUGINS_S3_CACHE,
|
||||||
"failure": "ignore",
|
"settings": {
|
||||||
"environment": {
|
"access_key": {
|
||||||
"MC_HOST_cache": {
|
"from_secret": "cache_s3_access_key",
|
||||||
"from_secret": "cache_s3_connection_url",
|
|
||||||
},
|
},
|
||||||
|
"secret_key": {
|
||||||
|
"from_secret": "cache_s3_secret_key",
|
||||||
|
},
|
||||||
|
"endpoint": {
|
||||||
|
"from_secret": "cache_s3_endpoint",
|
||||||
|
},
|
||||||
|
"flush": True,
|
||||||
|
"flush_age": "14",
|
||||||
|
"filename": "%s.tar" % (cache_key),
|
||||||
},
|
},
|
||||||
"commands": [
|
|
||||||
"mc rm --recursive --force cache/cache/%s/%s" % (ctx.repo.name, cache_key),
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"trigger": {
|
"trigger": {
|
||||||
@@ -2115,7 +2115,7 @@ def genericBuildArtifactCache(ctx, name, action, path):
|
|||||||
if action == "rebuild" or action == "restore":
|
if action == "rebuild" or action == "restore":
|
||||||
return genericCache(name, action, [path], cache_key)
|
return genericCache(name, action, [path], cache_key)
|
||||||
if action == "purge":
|
if action == "purge":
|
||||||
return genericCachePurge(ctx, name, cache_key)
|
return genericCachePurge(name, cache_key)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def restoreBuildArtifactCache(ctx, name, path):
|
def restoreBuildArtifactCache(ctx, name, path):
|
||||||
@@ -2295,7 +2295,7 @@ def parallelDeployAcceptancePipeline(ctx):
|
|||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
},
|
},
|
||||||
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
|
"steps": skipIfUnchanged(ctx, "acceptance-tests") +
|
||||||
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
|
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
|
||||||
restoreBuildArtifactCache(ctx, "testrunner", dirs["core"]) +
|
restoreBuildArtifactCache(ctx, "testrunner", dirs["core"]) +
|
||||||
restoreBuildArtifactCache(ctx, "testing_app", dirs["testing_app"]) +
|
restoreBuildArtifactCache(ctx, "testing_app", dirs["testing_app"]) +
|
||||||
copyConfigs() +
|
copyConfigs() +
|
||||||
@@ -2558,7 +2558,7 @@ def litmus(ctx, storage):
|
|||||||
"path": "src",
|
"path": "src",
|
||||||
},
|
},
|
||||||
"steps": skipIfUnchanged(ctx, "litmus") +
|
"steps": skipIfUnchanged(ctx, "litmus") +
|
||||||
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
|
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
|
||||||
ocisServer(storage) +
|
ocisServer(storage) +
|
||||||
setupForLitmus() +
|
setupForLitmus() +
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in new issue
Block a user