From 4e951c6af409a0dc654fc9f606b58f319de22ba8 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Wed, 27 Mar 2019 16:09:22 -0400 Subject: [PATCH] Add a job that runs the upload-git-mirror role This new job can be used by projects to mirror their repository to a remote git server. Change-Id: I6c51a6152f546dfdad2d0bfe260e8864e1803f8c --- doc/source/general-jobs.rst | 1 + playbooks/upload-git-mirror/run.yaml | 4 ++++ zuul.yaml | 28 ++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 playbooks/upload-git-mirror/run.yaml diff --git a/doc/source/general-jobs.rst b/doc/source/general-jobs.rst index 314e093bd..08b95c8c9 100644 --- a/doc/source/general-jobs.rst +++ b/doc/source/general-jobs.rst @@ -5,3 +5,4 @@ General Purpose Jobs .. zuul:autojob:: unittests .. zuul:autojob:: multinode .. zuul:autojob:: run-test-command +.. zuul:autojob:: upload-git-mirror diff --git a/playbooks/upload-git-mirror/run.yaml b/playbooks/upload-git-mirror/run.yaml new file mode 100644 index 000000000..7b9a6af9a --- /dev/null +++ b/playbooks/upload-git-mirror/run.yaml @@ -0,0 +1,4 @@ +- name: Mirror git repository to a remote git server + hosts: all + roles: + - upload-git-mirror diff --git a/zuul.yaml b/zuul.yaml index 6de795cfe..389dfe85e 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -50,6 +50,34 @@ nodeset: nodes: [] +- job: + name: upload-git-mirror + description: | + Mirrors a tested project repository to a remote git server. + + .. zuul:jobvar:: git_mirror_credentials + :type: dict + + This is expected to be a Zuul Secret with these keys: + + .. zuul:jobvar:: user + + SSH user for the remote git repository + + .. zuul:jobvar:: host + + SSH host for the remote git repository + + .. zuul:jobvar:: key + + Literal private key contents. + Should start with something like ``-----BEGIN RSA PRIVATE KEY-----``. + + .. zuul:jobvar:: git_mirror_repository + + Path of the remote git repository + run: playbooks/upload-git-mirror/run.yaml + - job: name: tox parent: unittests