Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Müller <80399010+fmoc@users.noreply.github.com>2021-06-10 17:20:12 +0300
committerGitHub <noreply@github.com>2021-06-10 17:20:12 +0300
commit7d02c7eadcc70ec27a096179404997f953e3db47 (patch)
tree16600a65bfd5e4ed3f4f5a030d9b2d71e26c9faf /.drone.star
parentabf2a25c269c888c9eab0c1415e43093d50a7f13 (diff)
Revert "Update translations in GitHub actions" (#8712)
* Revert "Move Docker commands into script" This reverts commit abf2a25c269c888c9eab0c1415e43093d50a7f13. * Revert "Remove obsolete command" This reverts commit 395ac240ba0beac322562d320d602effaa05297c. * Revert "Update translations in new GitHub actions workflow" This reverts commit dcab9dc6a3cf0ca0e334370b875604eeb9dde6ea. * Revert "Remove translations job from Drone config" This reverts commit cec5e9466d056a409cb34869e53ffff76d687572.
Diffstat (limited to '.drone.star')
-rw-r--r--.drone.star64
1 files changed, 64 insertions, 0 deletions
diff --git a/.drone.star b/.drone.star
index 45111011a..d61df0730 100644
--- a/.drone.star
+++ b/.drone.star
@@ -6,6 +6,9 @@
#
def main(ctx):
+ translations_trigger = {
+ "cron": ["translations-2-7"],
+ }
build_trigger = {
"ref": [
"refs/heads/master",
@@ -61,6 +64,22 @@ def main(ctx):
"clang-debug-ninja",
],
),
+
+ # Sync translations
+ update_translations(
+ ctx,
+ "client",
+ "translations",
+ read_image = "rabits/qt:5.12-desktop",
+ trigger = translations_trigger,
+ ),
+ notification(
+ name = "translations",
+ trigger = translations_trigger,
+ depends_on = [
+ "translations-client",
+ ],
+ ),
]
return pipelines
@@ -358,6 +377,51 @@ def make(target, path, image = "owncloudci/transifex:latest"):
],
}
+def update_translations(ctx, name, path, read_image = "owncloudci/transifex:latest", write_image = "owncloudci/transifex:latest", trigger = {}, depends_on = []):
+ return {
+ "kind": "pipeline",
+ "name": "translations-" + name,
+ "platform": {
+ "os": "linux",
+ "arch": "amd64",
+ },
+ "steps": [
+ make("l10n-read", path, read_image),
+ make("l10n-push", path),
+ make("l10n-pull", path),
+ make("l10n-write", path, write_image),
+ make("l10n-clean", path),
+ # keep time window for commit races as small as possible
+ {
+ "name": "update-repo-before-commit",
+ "image": "docker:git",
+ "commands": [
+ "git stash",
+ "git pull --ff-only origin +refs/heads/$${DRONE_BRANCH}",
+ '[ "$(git stash list)" = "" ] || git stash pop',
+ ],
+ },
+ whenOnline({
+ "name": "commit",
+ "image": "appleboy/drone-git-push",
+ "pull": "always",
+ "settings": {
+ "ssh_key": from_secret("git_push_ssh_key"),
+ "author_name": "ownClouders",
+ "author_email": "devops@owncloud.com",
+ "remote_name": "origin",
+ "branch": "${DRONE_BRANCH}",
+ "empty_commit": False,
+ "commit": True,
+ "commit_message": "[tx] updated " + name + " translations from transifex",
+ "no_verify": True,
+ },
+ }),
+ ],
+ "trigger": trigger,
+ "depends_on": depends_on,
+ }
+
def notification(name, depends_on = [], trigger = {}):
trigger = dict(trigger)
if not "status" in trigger: