{"id":50668181,"url":"https://github.com/last9/last9-jenkins-plugin","last_synced_at":"2026-06-08T08:07:57.436Z","repository":{"id":349511106,"uuid":"1174541959","full_name":"last9/last9-jenkins-plugin","owner":"last9","description":"Send deployment markers to Last9 from Jenkins. Never fails your build.","archived":false,"fork":false,"pushed_at":"2026-04-19T06:24:12.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T08:27:24.528Z","etag":null,"topics":["change-events","cicd","deployment","jenkins","jenkins-plugin","last9","observability"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/last9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-06T15:04:12.000Z","updated_at":"2026-04-19T06:24:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/last9/last9-jenkins-plugin","commit_stats":null,"previous_names":["last9/last9-jenkins-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/last9/last9-jenkins-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Flast9-jenkins-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Flast9-jenkins-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Flast9-jenkins-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Flast9-jenkins-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/last9","download_url":"https://codeload.github.com/last9/last9-jenkins-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Flast9-jenkins-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34053593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["change-events","cicd","deployment","jenkins","jenkins-plugin","last9","observability"],"created_at":"2026-06-08T08:06:49.389Z","updated_at":"2026-06-08T08:07:57.431Z","avatar_url":"https://github.com/last9.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Last9 Jenkins Plugin\n\nSend deployment markers to [Last9](https://last9.io) from Jenkins.\n\nEvery deploy fires a change event to Last9 with the commit SHA, branch, build URL, deployer, environment, and service name. Deployment annotations appear on every Last9 dashboard. Correlate latency spikes with deploys in seconds.\n\nDeployments are **windows**, not points. Send `start` when the deploy begins, `stop` when it finishes. Last9 shows the full window — you see performance during the rollout, not just after.\n\n## Setup\n\n**1. Create a credential**\n\n**Manage Jenkins → Credentials** → add a **Secret text** credential. The secret is your Last9 refresh token from `app.last9.io → Settings → API Tokens`.\n\n**2. Configure the plugin**\n\n**Manage Jenkins → System → Last9**:\n\n- **Organization Slug** — your org identifier from the Last9 URL (e.g. `acme`)\n- **API Credential** — the credential you just created\n- **Default Data Source Name** — optional\n\nHit **Test Connection** to verify before saving.\n\n## Pipeline\n\n### Deployment window (recommended)\n\nUse the `withLast9Deployment` block — the stop marker is guaranteed even on failure:\n\n```groovy\npipeline {\n  agent any\n  stages {\n    stage('Deploy') {\n      steps {\n        withLast9Deployment(serviceName: 'payments-api', environment: 'production') {\n          sh './deploy.sh'\n        }\n      }\n    }\n  }\n}\n```\n\n### Manual start/stop\n\n```groovy\npipeline {\n  agent any\n  stages {\n    stage('Deploy') {\n      steps {\n        last9DeploymentMarker(\n          serviceName: 'payments-api',\n          environment: 'production',\n          eventState: 'start'\n        )\n        sh './deploy.sh'\n        last9DeploymentMarker(\n          serviceName: 'payments-api',\n          environment: 'production',\n          eventState: 'stop'\n        )\n      }\n    }\n  }\n}\n```\n\n### Single marker\n\n```groovy\npost {\n  success {\n    last9DeploymentMarker serviceName: 'payments-api', environment: 'production'\n  }\n}\n```\n\n`eventState` defaults to `stop`.\n\n### All options\n\n```groovy\nlast9DeploymentMarker(\n  serviceName:    'payments-api',       // required\n  environment:    'production',         // recommended\n  eventState:     'start',              // 'start' or 'stop' (default: 'stop')\n  eventName:      'deployment',         // default: 'deployment'\n  dataSourceName: 'payments-ds',        // overrides global default\n  customAttributes: [\n    'deploy.version': '1.4.2',\n    'deploy.triggered_by': 'release-bot'\n  ],\n  // Override global config per-step (useful for multi-team Jenkins)\n  orgSlug:      'acme',\n  credentialId: 'last9-token-prod'\n)\n```\n\n### Auto-captured attributes\n\nThese are wired up automatically:\n\n| Attribute | Source |\n|---|---|\n| `scm.commit_sha` | `$GIT_COMMIT` |\n| `scm.branch` | `$GIT_BRANCH` |\n| `scm.url` | `$GIT_URL` |\n| `scm.author` | `$GIT_AUTHOR_NAME` |\n| `jenkins.job_name` | build metadata |\n| `jenkins.build_number` | build metadata |\n| `jenkins.build_url` | build metadata |\n| `jenkins.build_result` | build metadata |\n| `jenkins.build_duration_ms` | build metadata |\n| `jenkins.build_user` | triggered-by user |\n| `jenkins.node_name` | executor node |\n\n## Freestyle\n\n### Deployment window (start + stop)\n\nAdd **Track Last9 Deployment Window (start + stop)** in the **Build Environment** section. Sends `start` before the first build step, `stop` after the last — including on failure.\n\n### Single marker\n\nAdd **Send Last9 Deployment Marker** as a post-build action. Configure when to send:\n\n- **Send on Success** (default: on)\n- **Send on Failure** (default: off)\n- **Send on Unstable** (default: off)\n- **Send on Aborted** (default: off)\n\n## Error handling\n\nAPI failures never fail your build. The plugin logs a warning and moves on. Deployments ship; observability is best-effort.\n\nTransient failures (5xx, network timeouts) are retried up to 3 times with exponential backoff.\n\n## Multi-service pipelines\n\n```groovy\nstage('Deploy Services') {\n  parallel {\n    stage('API') {\n      steps {\n        last9DeploymentMarker serviceName: 'api', environment: 'production', eventState: 'start'\n        sh './deploy-api.sh'\n        last9DeploymentMarker serviceName: 'api', environment: 'production', eventState: 'stop'\n      }\n    }\n    stage('Worker') {\n      steps {\n        last9DeploymentMarker serviceName: 'worker', environment: 'production', eventState: 'start'\n        sh './deploy-worker.sh'\n        last9DeploymentMarker serviceName: 'worker', environment: 'production', eventState: 'stop'\n      }\n    }\n  }\n}\n```\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flast9%2Flast9-jenkins-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flast9%2Flast9-jenkins-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flast9%2Flast9-jenkins-plugin/lists"}