Why Nerve for GitLab CI
GitLab sends email notifications, but emails are noisy and unencrypted. Nerve gives you a real-time encrypted push on your phone from a single job step. The DSN stored in your CI/CD variables can only send — it cannot read history or run commands.
Basic .gitlab-ci.yml setup
Add a notification job that runs on pipeline failure.
stages:
- build
- test
- notify
build:
stage: build
script:
- make build
test:
stage: test
script:
- make test
notify-failure:
stage: notify
when: on_failure
script:
- go install github.com/nerve-ink/nerve-cli/cmd/nerve@latest
- echo "Pipeline failed: $CI_PROJECT_NAME ($CI_COMMIT_REF_NAME)" | nerve send --severity critical
variables:
NERVE_DSN: $NERVE_DSN
Notify on every pipeline result
Use when: always and include the job status in the message.
notify:
stage: notify
when: always
script:
- go install github.com/nerve-ink/nerve-cli/cmd/nerve@latest
- echo "$CI_PROJECT_NAME $CI_PIPELINE_STATUS ($CI_COMMIT_REF_NAME)" | nerve send
variables:
NERVE_DSN: $NERVE_DSN
Deploy notification with context
deploy-production:
stage: deploy
script:
- ./deploy.sh production
after_script:
- |
if [ "$CI_JOB_STATUS" = "failed" ]; then
echo "DEPLOY FAILED: $CI_PROJECT_NAME to production" | nerve send --severity critical
else
echo "Deployed $CI_PROJECT_NAME to production ($CI_COMMIT_SHORT_SHA)" | nerve send
fi
variables:
NERVE_DSN: $NERVE_DSN
Store the DSN as a CI/CD variable
Go to your GitLab project → Settings → CI/CD → Variables and add NERVE_DSN as a masked, protected variable.
NERVE_DSN=nerve://TOKEN:[email protected]
FAQ
How do I send GitLab CI pipeline alerts to my phone?
Add a nerve send step to your .gitlab-ci.yml. Use when: on_failure to alert only on failures, or when: always for every pipeline result. Store the DSN as a CI/CD variable.
Does Nerve work with self-hosted GitLab?
Yes. Nerve CLI sends signals over HTTPS to the Nerve relay. It works from any runner that can reach api.nerve.ink.
Is my CI/CD data encrypted?
Yes. Signal payloads are encrypted before leaving the runner. The Nerve relay sees only ciphertext and cannot read your pipeline output.