Files
angular__angular/.circleci
Paul Gschwendtner bac03a95d7 ci: do not capture nested bazel integration test workspace within Bazel (#44061)
The `integration/bazel` folder cannot be excluded within the
`.bazelignore` file. This is necessary so that the integration test
rule can glob for all files within the integration test.

The downside is that the `integration/bazel/<..>` folder is being
discovered by the `//...` target query, causing Starlark files to
be interpreted/validated. e.g.

https://app.circleci.com/pipelines/github/angular/angular/39255/workflows/c6c448ed-9a44-49b3-a0c2-2c7328ce2855/jobs/1079169

Previously such errors did not appear because no Starlark `.bzl` files
within the test imported other files using the `//` absolute resolution.

Explicitly excluding the nested packages using the `--deleted_packages`
option is the most idiomatic way of achieving this currently (similarly
done by `rules_nodejs`). More information on why this is so verbose
currently:

https://github.com/bazelbuild/bazel/issues/12034

PR Close #44061
2021-11-05 16:22:17 +00:00
..
2019-07-03 08:54:02 -07:00

Encryption

Based on https://github.com/circleci/encrypted-files

In the CircleCI web UI, we have a secret variable called KEY https://circleci.com/gh/angular/angular/edit#env-vars which is only exposed to non-fork builds (see "Pass secrets to builds from forked pull requests" under https://circleci.com/gh/angular/angular/edit#advanced-settings)

We use this as a symmetric AES encryption key to encrypt tokens like a GitHub token that enables publishing snapshots.

To create the github_token file, we take this approach:

  • Find the angular-builds:token in the internal pw database
  • Go inside the CircleCI default docker image so you use the same version of openssl as we will at runtime: docker run --rm -it circleci/node:10.12
  • echo "https://[token]:@github.com" > credentials
  • openssl aes-256-cbc -e -in credentials -out .circleci/github_token -k $KEY
  • If needed, base64-encode the result so you can copy-paste it out of docker: base64 github_token