Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fix for release pipeline #1330

Merged
merged 6 commits into from
Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions azure-pipelines/templates/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ steps:
condition: eq(variables['Agent.OS'], 'Linux')

- bash: |
echo "##vso[task.setvariable variable=sources.dir]$(Build.SourcesDirectory)"
echo "##vso[task.setvariable variable=tardis.dir]$(Build.SourcesDirectory)/tardis"
echo "##vso[task.setvariable variable=refdata.dir]$(Build.SourcesDirectory)/tardis-refdata"
displayName: 'Set source directories'
Expand All @@ -34,14 +33,15 @@ steps:
- bash: |
echo "##vso[task.setvariable variable=package.manager]mamba"
displayName: 'Set package manager'

- checkout: self
displayName: 'Fetch TARDIS repository from GitHub'
path: s/tardis
displayName: 'Fetch main repository'

- ${{ if eq(parameters.fetchRefdata, true) }}:
- checkout: git://TARDIS/tardis-refdata
lfs: true
displayName: 'Fetch reference data repository from Azure Repos'
displayName: 'Fetch reference data repository'

- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Add conda to PATH'
Expand All @@ -52,17 +52,17 @@ steps:

- ${{ if eq(parameters.useMamba, true) }}:
- bash: conda install mamba -c conda-forge -y
displayName: 'Install Mamba package manager'
displayName: 'Install package manager'

- ${{ if eq(parameters.skipInstall, false) }}:
- bash: |
cd $(tardis.dir)
$(package.manager) env create -f tardis_env3.yml
displayName: 'TARDIS environment install'
displayName: 'Install conda environment'

- ${{ if eq(parameters.skipInstall, false) }}:
- bash: |
cd $(tardis.dir)
source activate tardis
python setup.py build_ext --inplace
displayName: 'TARDIS build & install'
displayName: 'Build C extensions'
2 changes: 1 addition & 1 deletion docs/development/azure_links.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.. _azure documentation section on variables: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch
.. _azure documentation section on jobs: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
.. _azure documentation section on templates: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops
.. _checking out multiple repositories: https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops
.. _checking out multiple repositories: https://github.com/microsoft/azure-pipelines-yaml/blob/master/design/multi-checkout.md#behavior-changes-in-multi-checkout-mode
.. general stuff
.. _continuous integration: https://en.wikipedia.org/wiki/Continuous_integration

Expand Down
17 changes: 9 additions & 8 deletions docs/development/continuous_integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,16 @@ The most important (and confusing) predefined variables are the ones related
to paths in Azure:

* All folders for a given pipeline are created under ``Agent.BuildDirectory``
variable, alias ``Pipeline.Workspace``.
variable, alias ``Pipeline.Workspace``. This includes subdirectories like
``/s`` for sources or ``/a`` for artifacts.

* Cloned repositories are under the ``Build.Repository.LocalPath`` variable
alias ``Build.SourcesDirectory``. In TARDIS we implemented another alias
for this variable, named ``sources.dir``.
* Path to source code varies depending on how many repositories we fetch.
For example, source code is located under the ``Build.Repository.LocalPath``
variable (alias ``Build.SourcesDirectory``) when fetching a single repository,
but after fetching a second repository code is moved automatically to
``Build.Repository.LocalPath/repository-name``.

Our advice is to stick with ``Build.SourcesDirectory`` as much as possible
to avoid problems when `checking out multiple repositories`_.
See the Azure documentation to learn more about `checking out multiple repositories`_.


Jobs
Expand Down Expand Up @@ -245,7 +247,6 @@ to start a new pipeline use::

**List of predefined custom variables:**

- ``sources.dir`` is equivalent to ``$(Build.SourcesDirectory)``.
- ``tardis.dir`` is equivalent to ``$(Build.SourcesDirectory)/tardis``.
- ``refdata.dir`` is equivalent to ``$(Build.SourcesDirectory)/tardis-refdata``.

Expand All @@ -262,7 +263,7 @@ Documentation pipeline
----------------------

Builds and deploys the TARDIS documentation website. Currently, we are
using a github action to complete this pipeline. The action can be found at ``.github/workflows/documentation-build.yml``
using GitHub Actions for this purpose.


Zenodo JSON pipeline
Expand Down