CircleCI
To use an OIDC configuration in CircleCI you’ll need to use the
emulator-wtf/emulator-wtf@0.0.3
orb. emulator-wtf orb allows you to configure credentials and run the tests.
First, create a new configuration in emulator.wtf OIDC configurations page
and copy the OIDC configuration ID to the CircleCI project environment variables.
E.g you can use variable name OIDC_CONFIGURATION_ID.
Then add the orb to your project:
orbs:
emulator-wtf: emulator-wtf/emulator-wtf@0.0.3
With the orb added to your project, invoke the emulator-wtf/configure_credentials
- emulator-wtf/configure_credentials:
oidc_configuration_id: ${OIDC_CONFIGURATION_ID}
After invoking configure_credentials command a temporarily valid EW_API_TOKEN will be set and
you’ll be able to use ew-cli, the emulator.wtf Gradle plugin or emulator-wtf/run_tests command
without having to explicitly set the token.
A full example CircleCI workflow using OIDC with emulator.wtf:
version: 2.1
orbs:
emulator-wtf: emulator-wtf/emulator-wtf@0.0.3
jobs:
sample_test:
docker:
- image: cimg/openjdk:24.0
steps:
- checkout
- emulator-wtf/configure_credentials:
oidc_configuration_id: ${OIDC_CONFIGURATION_ID}
- emulator-wtf/run_tests:
app: sample-app.apk
test: sample-test.apk
workflows:
test-workflow:
jobs:
- sample_test