CircleCI
1. Contexts (Recommended)
Section titled “1. Contexts (Recommended)”Go to Organization Settings > Contexts.
Create a context named pakyas and add environment variable:
PAKYAS_API_KEY:pk_live_...
2. Config Example
Section titled “2. Config Example”version: 2.1
jobs: build: docker: - image: cimg/base:stable steps: - checkout - run: name: Install Pakyas command: | curl -fsSL https://pakyas.com/install.sh | sh echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$BASH_ENV" - run: name: Run Job command: pakyas monitor nightly-build -- ./run-tests.sh
workflows: nightly: jobs: - build: context: pakyas triggers: - schedule: cron: "0 0 * * *" filters: branches: only: - mainOnly PAKYAS_API_KEY is needed; the CLI takes the organization from the key. To avoid the key, store the check’s public ID in the context and run pakyas monitor --public-id "$PAKYAS_PUBLIC_ID" -- ./run-tests.sh. See CI and Cron Setup.
When always is needed
Section titled “When always is needed”CircleCI’s when: always attribute is useful for ensuring final pings send.
steps: - run: pakyas ping nightly-build --start - run: ./hazardous-script.sh - run: when: on_success command: pakyas ping nightly-build - run: when: on_fail command: pakyas ping nightly-build --fail