Skip to content

Commit

Permalink
Stop trying to use a runtime variable as a condition
Browse files Browse the repository at this point in the history
Microsoft is stupid
  • Loading branch information
guyer committed Dec 10, 2023
1 parent 861cf55 commit 6ea5e12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
7 changes: 1 addition & 6 deletions .azure/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ schedules:
variables:
system.debug: true
system.log: true
use_lockfile: not(eq(variables['Build.CronSchedule.DisplayName'], 'Daily midnight build'))
# use_lockfile: not(eq(variables['Build.CronSchedule.DisplayName'], 'Daily midnight build'))

stages:
- stage: Analyze
Expand All @@ -38,7 +38,6 @@ stages:
- template: templates/install.yml
parameters:
conda_packages: 'hunspell'
use_lockfile: ${{ variables.use_lockfile }}

- bash: |
source activate myEnvironment
Expand Down Expand Up @@ -66,7 +65,6 @@ stages:
- template: templates/install.yml
parameters:
conda_packages: 'numpy'
use_lockfile: ${{ variables.use_lockfile }}

- bash: |
source activate myEnvironment
Expand All @@ -89,7 +87,6 @@ stages:
- template: templates/install.yml
parameters:
conda_packages: 'numpy'
use_lockfile: ${{ variables.use_lockfile }}

- bash: |
source activate myEnvironment
Expand Down Expand Up @@ -164,7 +161,6 @@ stages:
- template: templates/install.yml
parameters:
conda_lock: environments/locks/conda-$(FIPY_SOLVERS)-lock.yml
use_lockfile: ${{ variables.use_lockfile }}

- bash: |
source activate myEnvironment
Expand Down Expand Up @@ -204,7 +200,6 @@ stages:
- template: templates/install.yml
parameters:
conda_lock: environments/locks/conda-$(FIPY_SOLVERS)-lock.yml
use_lockfile: ${{ variables.use_lockfile }}

- bash: git fetch origin --tags --force
displayName: Fetch tags
Expand Down
7 changes: 2 additions & 5 deletions .azure/templates/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ parameters:
- name: conda_lock
type: string
default: environments/locks/conda-scipy-lock.yml
- name: use_lockfile
type: boolean
default: true

steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
Expand Down Expand Up @@ -41,14 +38,14 @@ steps:
conda install --channel=conda-forge --name=base conda-lock
conda-lock install --name myEnvironment ${{ parameters.conda_lock }}
displayName: Create Anaconda environment from lockfile
condition: eq(parameters.use_lockfile, true)
condition: eq(variables['Build.CronSchedule.DisplayName'], 'Daily midnight build')
- bash: |
conda env create --name myEnvironment \
--file environments/environment.yml \
--file environments/$(FIPY_SOLVERS)-environment.yml
displayName: Create Anaconda environment from environments
condition: eq(parameters.use_lockfile, false)
condition: not(eq(variables['Build.CronSchedule.DisplayName'], 'Daily midnight build'))
- bash: |
if [[ "${{ parameters.conda_packages }}" != "" ]]; then
Expand Down

0 comments on commit 6ea5e12

Please sign in to comment.