From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: alex.bennee@linaro.org, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [PATCH v2] deploy docs to qemu-project.org from GitLab CI
Date: Tue, 19 Jan 2021 14:54:23 +0000 [thread overview]
Message-ID: <20210119145423.GI2335568@redhat.com> (raw)
In-Reply-To: <20210119144032.305380-1-pbonzini@redhat.com>
On Tue, Jan 19, 2021 at 03:40:32PM +0100, Paolo Bonzini wrote:
> Currently, the website is rebuilt on qemu-project.org using
> a separate container (https://github.com/stefanha/qemu-docs/)
> cron job hook. We can instead reuse the GitLab's CI artifacts.
>
> To do so, we use the same mechanism that is already in place for
> qemu-web.git.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> v1->v2: use same image and before_script as qemu-web.git
>
> .gitlab-ci.yml | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index fd0162ad29..d9afc79b30 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -6,6 +6,7 @@ stages:
> - containers-layer2
> - build
> - test
> + - update
>
> include:
> - local: '/.gitlab-ci.d/edk2.yml'
> @@ -627,3 +628,26 @@ pages:
> artifacts:
> paths:
> - public
> +
> +deploy:
> + image: centos:8
> + stage: update
> + needs:
> + - job: pages
> + artifacts: true
> + before_script:
> + - dnf install -y openssh-clients rsync
> + - eval $(ssh-agent -s)
> + - cat "$SSH_PRIVATE_KEY_FILE" | tr -d '\r' | ssh-add -
> + - mkdir -m700 -p ~/.ssh
> + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config'
> + script:
> + - ssh $SSH_DEPLOY_DESTINATION "cd /var/www/qemu-project.org && mkdir new-docs && rsync -az docs/ new-docs"
> + - rsync -avz --delete public/ $SSH_DEPLOY_DESTINATION:/var/www/qemu-project.org/new-docs
> + - ssh $SSH_DEPLOY_DESTINATION "cd /var/www/qemu-project.org && rm -rf old-docs && mv docs old-docs && mv new-docs docs"
> + only:
> + refs:
> + - master
> + variables:
> + - $SSH_PRIVATE_KEY_FILE
> + - $SSH_DEPLOY_DESTINATION
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2021-01-19 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 14:40 [PATCH v2] deploy docs to qemu-project.org from GitLab CI Paolo Bonzini
2021-01-19 14:54 ` Daniel P. Berrangé [this message]
2021-01-19 16:14 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210119145423.GI2335568@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.