feat: add copybara-base job

Change-Id: I0b5aa5b72d00612d3444cc714fb8ad1d983ace72
diff --git a/playbooks/copybara-base/cleanup.yaml b/playbooks/copybara-base/cleanup.yaml
new file mode 100644
index 0000000..655e957
--- /dev/null
+++ b/playbooks/copybara-base/cleanup.yaml
@@ -0,0 +1,3 @@
+- hosts: all
+  roles:
+    - remove-copybara-credential-store
diff --git a/playbooks/copybara-base/pre.yaml b/playbooks/copybara-base/pre.yaml
new file mode 100644
index 0000000..4c4f314
--- /dev/null
+++ b/playbooks/copybara-base/pre.yaml
@@ -0,0 +1,5 @@
+- hosts: all
+  roles:
+    - role: add-copybara-credential-store
+      vars:
+        git_credentials: copybara_secrets.git_credentials
diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml
index 7cbf599..33046a5 100644
--- a/zuul.d/jobs.yaml
+++ b/zuul.d/jobs.yaml
@@ -24,3 +24,25 @@
     secrets:
       - name: s3_config
         secret: s3-secrets
+
+- job:
+    name: copybara-base
+    parent: base
+    description: |
+      Base job for jobs which deal with Copybara.
+
+      It sets up the git credentials for the Copybara bot.
+    pre-run:
+      - playbooks/copybara-base/pre.yaml
+    cleanup-run:
+      - playbooks/copybara-base/cleanup.yaml
+    roles:
+      - zuul: zuul/jobs
+    post-review: true
+    nodeset:
+      nodes:
+        - name: copybara
+          label: copybara
+    secrets:
+      - name: copybara_secrets
+        secret: copybara-secrets
diff --git a/zuul.d/secrets.yaml b/zuul.d/secrets.yaml
index 25f6ab0..898ade6 100644
--- a/zuul.d/secrets.yaml
+++ b/zuul.d/secrets.yaml
@@ -25,3 +25,17 @@
           IV9hhvv5NJNTrRenfhlhGOBM9S+94Lq/98cLPWuNKnW0i7w4UAUNxaYNcJQtphYNiETB2
           i8uo8RuQGMO4CJDEnI9F0zvz5cPJAJFvbn2LkoX7l/qWOp1091YXxBbVT7WvHi0rgJcie
           Hsde2UkizxiH+JpA0N8hxSNbVjp+chJoudlg1l3GgJYct/0w+phCEkhcJ24bGw=
+- secret:
+    name: copybara-secrets
+    data:
+      git_credentials: !encrypted/pkcs1-oaep
+        - gIbfXTRcXuReYBeSr6hryH+0vQPrkoFkLwNEwnfRDlMWmYRyU61yxn4Yw1CuEzBvwtw9G
+          SqN0rl+unuPNXB7sUqRwupKp9kNfcEGeWBJMTpWnObvu43uI4y21y4PjCrKCiPA2QuKCf
+          ZO9uri3j4mlO7L5IU2aCr4MZEBK3zLeWl5RvWVTjaOwFDZ07au+2BPH1QOMwjuHmfGIUw
+          c47GzddYCtXhVBT8Uy8Uh1mNMrqEg3pPqw+LtPGAm4rhXNUw2VB88XrjJxUtbkglk55WG
+          OsSgN0PSNNc4F8Wb4wchnQVzf8ghAfsKutMCCV9yQAAx0k9iEAY0RuWEcCJ2rv7jSCM4+
+          C1R0G4U5NjAvBFV1HjwwEu1EJTX5moaq7zcaORRdaja+FdXoZ+kOZLMpJHMH/rX2GnDU+
+          6yGzbtobiit6uiEEh36QRoYYGrZejB/0oyrnoayO2rzT71tyLeJ0dRiKoubOYZc+Bfxuz
+          2vL+W6wmwZKALZ9LRNYpix17PuSxvXl+eWQ/n2Nq4/nQZpXGg4jLUrEbOBKTqH4bvxPaR
+          5YUN6wxPV41OkxpqnKhiwxLej7Idicwx8/jB6Qk2NAkYKWH5DteRuEwIOqDiv5oz4RP7Q
+          LS+5yjW25TmhpSdEpmOva3qC2YB0L2NcqbpV4QpsbiRcFDfdCJDgrHZJscq2gA=