diff --git a/.woodpecker.star b/.woodpecker.star index e88ff42c1..c159b9eac 100644 --- a/.woodpecker.star +++ b/.woodpecker.star @@ -954,7 +954,7 @@ def localApiTestPipeline(ctx): def localApiTests(name, suites, storage = "decomposed", extra_environment = {}, with_remote_php = False): test_dir = "%s/tests/acceptance" % dirs["base"] - expected_failures_file = "%s/expected-failures-localAPI-on-decomposed-storage.md" % (test_dir) + expected_failures_file = "%s/expected-failures-localAPI-on-decomposed-storage.md" % test_dir environment = { "TEST_SERVER_URL": OC_URL, @@ -1201,7 +1201,7 @@ def apiTests(ctx): for runPart in range(1, config["apiTests"]["numberOfParts"] + 1): for run_with_remote_php in defaults["withRemotePhp"]: - if (not debugPartsEnabled or (debugPartsEnabled and runPart in debugParts)): + if not debugPartsEnabled or (debugPartsEnabled and runPart in debugParts): pipelines.append(coreApiTests(ctx, runPart, config["apiTests"]["numberOfParts"], run_with_remote_php)) return pipelines @@ -1241,10 +1241,10 @@ def e2eTestPipeline(ctx): pipelines = [] - if ("skip-e2e" in ctx.build.title.lower()): + if "skip-e2e" in ctx.build.title.lower(): return pipelines - if (ctx.build.event == "tag"): + if ctx.build.event == "tag": return pipelines storage = "posix" @@ -1344,11 +1344,11 @@ def multiServiceE2ePipeline(ctx): }, ] - if ("skip-e2e" in ctx.build.title.lower()): + if "skip-e2e" in ctx.build.title.lower(): return pipelines # run this pipeline only for cron jobs and full-ci PRs - if (not "full-ci" in ctx.build.title.lower() and ctx.build.event != "cron"): + if not "full-ci" in ctx.build.title.lower() and ctx.build.event != "cron": return pipelines storage = "posix" @@ -1546,7 +1546,7 @@ def dockerReleases(ctx): def dockerRelease(ctx, repo, build_type): build_args = [ - "REVISION=%s" % (ctx.build.commit), + "REVISION=%s" % ctx.build.commit, "VERSION=%s" % (ctx.build.ref.replace("refs/tags/", "") if ctx.build.event == "tag" else "daily"), ] @@ -1845,7 +1845,7 @@ def releaseDockerReadme(repo, build_type): "from_secret": "docker_password", }, "PUSHRM_TARGET": repo, - "PUSHRM_SHORT": "Docker images for %s" % (repo), + "PUSHRM_SHORT": "Docker images for %s" % repo, "PUSHRM_FILE": "README.md", }, }, @@ -1905,7 +1905,7 @@ def makeNodeGenerate(module): if module == "": make = "make" else: - make = "make -C %s" % (module) + make = "make -C %s" % module return [ { "name": "generate nodejs", @@ -1915,7 +1915,7 @@ def makeNodeGenerate(module): }, "commands": [ "pnpm config set store-dir ./.pnpm-store", - "for i in $(seq 3); do %s node-generate-prod && break || sleep 1; done" % (make), + "for i in $(seq 3); do %s node-generate-prod && break || sleep 1; done" % make, ], }, ] @@ -1924,13 +1924,13 @@ def makeGoGenerate(module): if module == "": make = "make" else: - make = "make -C %s" % (module) + make = "make -C %s" % module return [ { "name": "generate go", "image": OC_CI_GOLANG, "commands": [ - "for i in $(seq 3); do %s go-generate && break || sleep 1; done" % (make), + "for i in $(seq 3); do %s go-generate && break || sleep 1; done" % make, ], "environment": CI_HTTP_PROXY_ENV, }, @@ -1975,7 +1975,7 @@ def opencloudServer(storage = "decomposed", accounts_hash_difficulty = 4, depend environment = { "OC_URL": OC_URL, "OC_CONFIG_DIR": "/root/.opencloud/config", # needed for checking config later - "STORAGE_USERS_DRIVER": "%s" % (storage), + "STORAGE_USERS_DRIVER": "%s" % storage, "PROXY_ENABLE_BASIC_AUTH": True, "WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["opencloudConfig"]), "OC_LOG_LEVEL": "error", @@ -2065,7 +2065,7 @@ def opencloudServer(storage = "decomposed", accounts_hash_difficulty = 4, depend # That will allow OpenCloud to use whatever its built-in default is. # Otherwise pass in a value from 4 to about 11 or 12 (default 4, for making regular tests fast) # The high values cause lots of CPU to be used when hashing passwords, and really slow down the tests. - if (accounts_hash_difficulty != "default"): + if accounts_hash_difficulty != "default": environment["ACCOUNTS_HASH_DIFFICULTY"] = accounts_hash_difficulty for item in extra_server_environment: @@ -2078,7 +2078,7 @@ def opencloudServer(storage = "decomposed", accounts_hash_difficulty = 4, depend ] wait_for_opencloud = { - "name": "wait-for-%s" % (container_name), + "name": "wait-for-%s" % container_name, "image": OC_CI_ALPINE, "commands": [ # wait for opencloud-server to be ready (5 minutes) @@ -2102,7 +2102,7 @@ def opencloudServer(storage = "decomposed", accounts_hash_difficulty = 4, depend "%s init --insecure true" % dirs["opencloudBin"], "cat $OC_CONFIG_DIR/opencloud.yaml", "cp tests/config/woodpecker/app-registry.yaml $OC_CONFIG_DIR/app-registry.yaml", - ] + (wrapper_commands), + ] + wrapper_commands, } steps = [ @@ -2240,7 +2240,7 @@ def example_deploys(ctx): def deploy(config, rebuild): return { - "name": "deploy_%s" % (config), + "name": "deploy_%s" % config, "steps": [ { "name": "clone continuous deployment playbook", @@ -2255,7 +2255,7 @@ def deploy(config, rebuild): "image": OC_CI_DRONE_ANSIBLE, "failure": "ignore", "environment": { - "CONTINUOUS_DEPLOY_SERVERS_CONFIG": "../%s" % (config), + "CONTINUOUS_DEPLOY_SERVERS_CONFIG": "../%s" % config, "REBUILD": rebuild, "HCLOUD_API_TOKEN": { "from_secret": "hcloud_api_token", @@ -2345,7 +2345,7 @@ def genericCache(name, action, mounts, cache_path): "secret_key": { "from_secret": "cache_s3_secret_key", }, - "filename": "%s.tar" % (name), + "filename": "%s.tar" % name, "path": cache_path, "fallback_path": cache_path, }, @@ -2390,7 +2390,7 @@ def genericCachePurge(flush_path): def genericBuildArtifactCache(ctx, name, action, path): if action == "rebuild" or action == "restore": cache_path = "%s/%s/%s" % ("cache", repo_slug, ctx.build.commit + "-${CI_PIPELINE_NUMBER}") - name = "%s_build_artifact_cache" % (name) + name = "%s_build_artifact_cache" % name return genericCache(name, action, [path], cache_path) if action == "purge": @@ -2425,7 +2425,7 @@ def pipelineSanityChecks(pipelines): for pipeline in pipelines: pipeline_name = pipeline["name"] if len(pipeline_name) > max_name_length: - print("Error: pipeline name %s is longer than 50 characters" % (pipeline_name)) + print("Error: pipeline name %s is longer than 50 characters" % pipeline_name) for step in pipeline["steps"]: step_name = step["name"] @@ -2476,7 +2476,7 @@ def pipelineSanityChecks(pipelines): def litmus(ctx, storage): pipelines = [] - if (config["litmus"] == False): + if not config["litmus"]: return pipelines environment = {