diff --git a/.gcloudignore b/.gcloudignore new file mode 100644 index 000000000..e69de29bb diff --git a/dist/translations/cloudbuild-pull.yaml b/dist/translations/cloudbuild-pull.yaml new file mode 100644 index 000000000..402259ad7 --- /dev/null +++ b/dist/translations/cloudbuild-pull.yaml @@ -0,0 +1,72 @@ +steps: +- name: 'gcr.io/cloud-builders/gcloud' + args: + - kms + - decrypt + - --ciphertext-file=dist/translations/id_rsa.enc + - --plaintext-file=/root/.ssh/id_rsa + - --location=global + - --keyring=translations + - --key=transifex + volumes: + - name: 'ssh' + path: /root/.ssh + +- name: 'gcr.io/cloud-builders/git' + entrypoint: 'bash' + args: + - -c + - | + chmod 600 /root/.ssh/id_rsa + cat </root/.ssh/config + Hostname github.com + IdentityFile /root/.ssh/id_rsa + EOF + mv dist/translations/known_hosts /root/.ssh/known_hosts + volumes: + - name: 'ssh' + path: /root/.ssh + +- name: 'gcr.io/cloud-builders/docker' + args: ['build', '-t', 'transifex', '.'] + dir: 'dist/translations/transifex' + +- name: 'transifex' + secretEnv: ['TX_TOKEN'] + args: ['init', '--no-interactive', '--force'] + +- name: 'transifex' + secretEnv: ['TX_TOKEN'] + args: ['config', 'mapping', '--execute', '-r', 'clementine.clementineplayer', '-s', 'en', '-t', 'PO', 'src/translations/.po'] + +- name: 'transifex' + secretEnv: ['TX_TOKEN'] + args: ['pull', '--all', '-f', '--no-interactive'] + +- name: 'gcr.io/cloud-builders/git' + entrypoint: 'bash' + args: + - -c + - | + git add src/translations/*.po + +- name: 'gcr.io/cloud-builders/git' + args: + - -c + - user.name=Clementine Buildbot + - -c + - user.email=buildbot@clementine-player.org + - commit + - --message + - Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) + +- name: 'gcr.io/cloud-builders/git' + args: ['push', 'git@github.com:clementine-player/Clementine.git', 'master'] + volumes: + - name: 'ssh' + path: /root/.ssh + +secrets: +- kmsKeyName: projects/clementine-data/locations/global/keyRings/translations/cryptoKeys/transifex + secretEnv: + TX_TOKEN: CiQAmOiGiwceV26v7vX/yvQQXkMJ7+zwH9Y2zy+B4FtwM1iVdj8SVAD+AEzLJXJ6d+hGZlJPYjbbxL6/wiOhQIZLc+yvFznLSIn6dtCAhFecNqYX+cj+nxuZ/uHR9p72kj7PPsqy54WkWRvbG1Xl4CQX67wy3cqnlRHsqQ== diff --git a/dist/translations/id_rsa.pub b/dist/translations/id_rsa.pub new file mode 100644 index 000000000..decd5a4a4 --- /dev/null +++ b/dist/translations/id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmdCNCDDSWyj9aw9CkAeBb8dtsO4d7qhK15Pv8WCMCJ8p7iErJC9OVE649mbgZKMW42+5D9xkZI0Sh/v8og+Khvxpv53REdW5T5VHSPejXZlA0+VDZYr5ubaUn2bQlFsu2KkMmCOY+gC2QNTDi83FDdcYOxnpr4XoGLUgCGDAiRxVcEV22EsT/5FQRjE2D4te6pUOMYZMrVoZx/GVHoy/Pf1DuhAsPEtrQBH3o56GaGZ7dVNRjPkuJDjQjCnAkar4fmMMKKX+nw+rzlWE7248uaRJCApn/+LAxKuB+Ol3Wtuye/FQFvO7S7aBRFoqWRwRmjL0hptAQmhVf7/wwKZbT john@zem