about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-26 18:56:56 +0200
committerGitHub <noreply@github.com>2019-07-26 18:56:56 +0200
commit7e1ce7da80f45b512601708fbaa637d1b609e189 (patch)
tree24ab89e3fae522223b2c93a56619d936307f1cd8 /src/test/ui/thinlto
parent035078f73e3a8a911f0bd9a3c225a4c3d8ee80fa (diff)
parentb01b5b911f3bb209ee619055a154cd81ca0674be (diff)
downloadrust-7e1ce7da80f45b512601708fbaa637d1b609e189.tar.gz
rust-7e1ce7da80f45b512601708fbaa637d1b609e189.zip
Rollup merge of #62970 - pietroalbini:fix-tools-builder, r=alexcrichton
ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar

This PR fixes toolstate failing to push on the LinuxTools PR builder by gating the pushes on the new `TOOLSTATE_PUBLISH` environment variable, which is set on prod credentials but not on the PR ones. The old code checked whether the access token was set, but that doesn't work due to an Azure quirk.

For a bit of background, secret environment variables are not available by default, but each step needs to explicitly declare which secret vars to load:

```yaml
- bash: echo foo
  env:
    SECRET_VAR: $(SECRET_VAR)
```

This works fine when the variable is present but when it's missing, instead of setting `SECRET_VAR` to an empty string or just not setting it at all, Azure Pipelines puts the literal `$(SECRET_VAR)` as the content, which completly breaks the old check we had. I tried almost every thing to make this work in a sensible way, and the only conclusion I reached is to set the variable at the top level with the runtime expression evaluation syntax, which sets the variable to an empty string if missing:

```yaml
# At the top:
variables:
  - name: MAYBE_SECRET_VAR
    value: $[ variables.MAYBE_SECRET_VAR ]

# In the step:
- bash: echo foo
  env:
    SECRET_VAR: $(MAYBE_SECRET_VAR)
```

While that *could've worked* it was ugly and messy, so I just opted to add yet another non-secret variable.

r? @alexcrichton
fixes #62811
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions