{"id":18419476,"url":"https://github.com/liftric/octopus-deploy-plugin","last_synced_at":"2026-02-27T01:04:30.264Z","repository":{"id":45366264,"uuid":"254355172","full_name":"Liftric/octopus-deploy-plugin","owner":"Liftric","description":"[gradle-plugin] Common tasks for Octopus Deploy interaction, like package or build-information uploading","archived":false,"fork":false,"pushed_at":"2024-08-16T04:47:17.000Z","size":253,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-02-08T00:40:05.613Z","etag":null,"topics":["automation","gradle-plugin","infrastructure","octopus","octopus-api","octopus-deploy","octopus-deploy-cli"],"latest_commit_sha":null,"homepage":"https://plugins.gradle.org/plugin/com.liftric.octopus-deploy-plugin","language":"Kotlin","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/Liftric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2020-04-09T11:40:53.000Z","updated_at":"2024-08-15T17:34:02.000Z","dependencies_parsed_at":"2025-04-07T13:46:49.631Z","dependency_job_id":null,"html_url":"https://github.com/Liftric/octopus-deploy-plugin","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/Liftric/octopus-deploy-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2Foctopus-deploy-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2Foctopus-deploy-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2Foctopus-deploy-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2Foctopus-deploy-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Liftric","download_url":"https://codeload.github.com/Liftric/octopus-deploy-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2Foctopus-deploy-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29879915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["automation","gradle-plugin","infrastructure","octopus","octopus-api","octopus-deploy","octopus-deploy-cli"],"created_at":"2024-11-06T04:17:10.673Z","updated_at":"2026-02-27T01:04:30.225Z","avatar_url":"https://github.com/Liftric.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# octopus-deploy-plugin (gradle plugin)\n![GitHub](https://img.shields.io/github/license/Liftric/octopus-deploy-plugin)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/Liftric/octopus-deploy-plugin)\n[![CircleCI](https://circleci.com/gh/Liftric/octopus-deploy-plugin/tree/master.svg?style=svg)](https://circleci.com/gh/Liftric/octopus-deploy-plugin/tree/master)\n\n![Gradle meets Octopus Deploy](./gradle-octopus.webp)\n\nThe octopus-deploy-plugin generates build-information and uploads packages and generated build-information to Octopus Deploy instances.\n\nRequirements:\n * [Octopus Deploy CLI](https://octopus.com/downloads/octopuscli)\n * git (for commit/changelog calculation)\n \n# Usage\nThe plugin can be configured with the `octopus` DSL block:\n```kotlin\nplugins {\n    id(\"com.liftric.octopus-deploy-plugin\") version \"whatever\"\n}\n// ...\noctopus {\n    serverUrl.set(\"http://localhost:8080/\")\n    apiKey.set(\"API-TESTTEST123TRESDTSDD\")\n\n    generateChangelogSinceLastTag.set(true)\n\n    val jar by tasks.existing(Jar::class)\n    packageName.set(jar.get().archiveBaseName.get())\n    version.set(jar.get().archiveVersion.get())\n    pushPackage.set(jar.get().archiveFile)\n}\n```\n\nSee the example directory for a minimal, working example.\n\n## tasks\nThe following tasks are added by the plugin:\n\nTask | Description\n---|---\npreviousTag | Calls git describe to receive the previous tag name. Will fail if no tag is found.\nfirstCommitHash | Calls git log to get the first commit hash of the current history tree\ncommitsSinceLastTag | Calls git log to receive all commits since the previous tag or the first commit of the current history.\ncreateBuildInformation | Creates the octopus build-information file.\nuploadBuildInformation | Uploads the created octopus build-information file.\nuploadPackage | Uploads the package to octopus.\nPromoteReleaseTask | Promotes octopus project from one environment to another\n\nFor normal use-cases, only `uploadBuildInformation` and `uploadPackage` are needed to call explicitly. Depending\ntasks will be called implicitly by both as needed.\n\n**Noteworthy**: The build-information can be uploaded before the package itself. \nUseful when creating automatic releases and using the commits in the release notes in octopus.\n\n### PromoteReleaseTask\nThe PromoteReleaseTask has no default implementation and must be created explicitly:\n```kotlin\nimport com.liftric.octopusdeploy.task.PromoteReleaseTask\n// ...\ntasks {\n    val devToDemo by creating(PromoteReleaseTask::class) {\n        projectName.set(\"example-project\")\n        from.set(\"dev\")\n        to.set(\"demo\")\n    }\n}\n```\nCalling `./gradlew devToDemo` on this example will promote the current **from** release of the octopus project **example-project**\nto the **to** environment.\n\n## naming\nOctopus deploy expects the name and version in the following format: `\u003cname\u003e.\u003cversion\u003e.\u003cextension\u003e`\n\nFor Java archives, `\u003cname\u003e-\u003cversion\u003e.\u003cextension\u003e` is conventional, so should be changed to get picked up properly by octopus.\nOtherwise the first version number part will be parsed as part of the name.\n\n## configuration\nAfter the plugin is applied, the octopus extension is registered with the following settings:\n\nProperty | Description | default value \n---|---|---\napiKey | Octopus deploy server API key | -\nserverUrl | Octopus deploy server URL | -\ngenerateChangelogSinceLastTag | Enable to calculate the commits for the changelog when uploading build-information (needs git installed) | false\ncommitLinkBaseUrl | Prefix / Baseurl for the build-information commit urls | http://git.example.com/repo/commits/\noutputDir | Output folder for files generated by the plugin | build/octopus\ngitRoot | Directory to run the git helpers in. By default the projects root dir | project.rootDir\npushPackage | Target file (package) which will be uploaded to octopus | -\nversion | Package version | -\npackageName | Package name | -\nbuildInformationOverwriteMode | octo build-information OverwriteMode | -\npushOverwriteMode | octo push OverwriteMode | -\nbuildInformationAddition | Customize the final octopus build-information before uploading | {}\ngitlab | Default `buildInformationAddition` implementation adding context from the CI environment for Gitlab CI. Also sets `commitLinkBaseUrl`. | not applied\nhttpLogLevel | configures the http logging while using the Octopus API | `HttpLoggingInterceptor.Level.NONE`\nissueTrackerName | When parsing issues the target issue tracker name is needed. Currently only `Jira` supported | **optional/none**\nparseCommitsForJiraIssues | Enable Jira Issue parsing. This needs the changelog generation enabled to parse the commits there. | **optional/none**\njiraBaseBrowseUrl | For proper Jira URLs we need the base URL, something like `https://testric.atlassian.net/browse/`. | **optional/none**\nuseShortCommitHashes | Use short (7 char) commit hashes. | true\n\n`generateChangelogSinceLastTag` extracts all commits between the HEAD and the last tag. \nIf no tag is found, the first commit in the history tree is used instead.\n\nYou can configure `serverUrl` and `apiKey` using a provider which enables configuring them on demand, not at configuration time:\n```kotlin\napiKey.set(provider {\n    \"API-TESTTEST123TRESDTSDD\"\n    // read from file / vault / etc.\n})\n```\n\nTo customize the build information, use the `buildInformationAddition` block:\n```kotlin\nbuildInformationAddition.set({\n    Id = \"custom-id\"\n    // Add other properties as needed\n})\n\n```\n\nFor GitLab CI integration, set the `gitlab` block:\n```kotlin\ngitlab {\n    Id = \"custom-id\"\n    // Add other properties as needed\n}\n```\n\n### task specific configuration\nBoth the **PromoteReleaseTask** and **UploadPackageTask** provide support for waiting\nfor any deployment on octopus deploy and will block task finishing until all octopus deploy tasks are finished.\n\nBasically if the upload or progression triggers a release in octopus deploy, the tasks will wait until they are completed.\n\nConfiguration is done on the tasks themself:\n\nProperty | Description                                                 | default value \n---|---|---\nwaitForReleaseDeployments | If the task should wait                                     | false\nwaitTimeoutSeconds | max time to poll the Ocotopus API                           | 600\ndelayBetweenChecksSeconds | how long to delay between polls                             | 5\ninitialWaitSeconds | initial delay before waitForReleaseDeployments logic starts | -\n\nExample:\n```kotlin\nimport com.liftric.octopusdeploy.task.PromoteReleaseTask\nimport com.liftric.octopusdeploy.task.UploadPackageTask\n// ...\ntasks {\n    val devToDemo by creating(PromoteReleaseTask::class) {\n        waitForReleaseDeployments.set(true)\n        projectName.set(\"example-project\")\n        from.set(\"dev\")\n        to.set(\"staging\")\n    }\n    withType\u003cUploadPackageTask\u003e() {\n        waitForReleaseDeployments.set(true)\n    }\n}\n```\n\n# Credits\nThanks to [Octopus Deploy](https://octopus.com/) for the permission to use the header image.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliftric%2Foctopus-deploy-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliftric%2Foctopus-deploy-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliftric%2Foctopus-deploy-plugin/lists"}