forked from eclipse-cyclonedds/eclipse-cyclonedds.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
69 lines (65 loc) · 2.21 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# Copyright(c) 2022 ZettaScale Technology and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
# v. 1.0 which is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#
trigger: none
pr: none
schedules:
- cron: "0 0 * * *"
displayName: Midnight Refresh
always: true
branches:
include:
- master
pool:
vmImage: ubuntu-22.04
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
name: install_python
displayName: Install Python
- bash: |
set -ex
sudo apt-get install -y doxygen
git fetch origin ${BUILD_SOURCEBRANCHNAME}
git checkout ${BUILD_SOURCEBRANCHNAME}
pip install poetry --user --upgrade
poetry install
name: install_project_deps
displayName: Install project dependencies
- bash: |
set -ex
mkdir repos
git clone https://github.com/eclipse-cyclonedds/cyclonedds repos/cyclonedds
git clone https://github.com/eclipse-cyclonedds/cyclonedds-cxx repos/cyclonedds-cxx
git clone https://github.com/eclipse-cyclonedds/cyclonedds-python repos/cyclonedds-python
poetry run builder --commit-if-updated --repos ./repos
name: run_site_builder
displayName: Run site build
- task: InstallSSHKey@0
inputs:
knownHostsEntry: $(known_hosts_entry)
sshKeySecureFile: deploy_key
- bash: |
set -ex
# was-updated is written by the builder if there are updates
if [[ -f "was-updated" ]]; then
# push builders commit
git config --local user.name "Azure Pipelines"
git config --local user.email "[email protected]"
git config --global --add url."[email protected]:".insteadOf "https://github.com/"
git push
# Let python tool handle the gh-pages sync
poetry run ghp-import --no-jekyll --cname=cyclonedds.io --message="Azure build ${BUILD_BUILDNUMBER} for commit $(git rev-parse --verify HEAD)" --no-history pages/
git push -f origin gh-pages
fi
name: publish
displayName: Publish