-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#76] Explicitly creating staging repository in Nexus - WIP
Internal implementation in the Exploratory E2E tests to verify it with Travis.
- Loading branch information
Showing
5 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule nexus-at-minimal
updated
from c6abaa to 2ab799
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/groovy/io/codearte/gradle/nexus/logic/RepositoryCreator.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.codearte.gradle.nexus.logic | ||
|
||
import groovy.transform.InheritConstructors | ||
import groovy.util.logging.Slf4j | ||
import io.codearte.gradle.nexus.infra.SimplifiedHttpJsonRestClient | ||
|
||
//@InheritConstructors //TODO: Why broken??? | ||
@Slf4j | ||
class RepositoryCreator extends BaseOperationExecutor { | ||
|
||
RepositoryCreator(SimplifiedHttpJsonRestClient client, String nexusUrl) { | ||
super(client, nexusUrl) | ||
} | ||
|
||
String createStagingRepositoryAndReturnId(String stagingProfileId) { | ||
log.info("Creating staging repository for staging profile '$stagingProfileId'") | ||
Map responseAsMap = client.post(nexusUrl + "/staging/profiles/${stagingProfileId}/start", | ||
[data: [description: "Explicitly created by gradle-nexus-staging-plugin"]]) | ||
|
||
log.info("Raw response as map: $responseAsMap") | ||
String repositoryId = responseAsMap.data.stagedRepositoryId | ||
log.info("Created staging repository with id: $repositoryId") | ||
return repositoryId | ||
} | ||
} |