-
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.
- Loading branch information
Showing
25 changed files
with
433 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# EditorConfig: http://EditorConfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.json] | ||
indent_size = 2 |
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,29 @@ | ||
0.6.0 - 2017-03-19 | ||
|
||
- Consider state trying to find just one repository in given state - [#36](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/36) - contribution by [strelok1](https://github.com/strelok1) | ||
- Better error message in case of HTTP request failure - [#5](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/5) - contribution by [deanhiller](https://github.com/deanhiller) | ||
- Add EditorConfig configuration to better deal with spaces vs tabs - [#33](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/33) | ||
|
||
0.5.3 - 2015-06-13 | ||
|
||
- `packageGroup` should be taken from project.group by default - [#11](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/11) | ||
|
||
0.5.2 - 2015-06-09 | ||
|
||
- Provide single task to close and promote repository - [#9](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/9) | ||
- `getStagingProfile` task should display output without `--info` switch - [#8](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/8) | ||
|
||
0.5.1 - 2015-03-08 | ||
|
||
- Credentials should be automatically fetched from configured deployer - [#7](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/7) | ||
- Credentials should be automatically fetched from Gradle properties (when available) - [#6](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/6) | ||
|
||
0.5.0 - 2015-03-02 | ||
|
||
- Wait given time period when repositories are not yet available - [#3](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/3) | ||
- Use configured stagingProfileId when available - [#2](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/2) | ||
- nexusUrl by default should use Sonatype OSSRH - [#1](https://github.com/Codearte/gradle-nexus-staging-plugin/issues/1) | ||
|
||
0.4.0 - 2015-02-27 | ||
|
||
- Initial release |
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
22 changes: 22 additions & 0 deletions
22
src/main/groovy/io/codearte/gradle/nexus/infra/NexusHttpResponseException.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,22 @@ | ||
package io.codearte.gradle.nexus.infra | ||
|
||
import groovy.transform.CompileStatic | ||
|
||
/** | ||
* Custom exception to propagate server errors. | ||
* | ||
* Created as groovyx.net.http.HttpResponseException contains in a message only a reason phrase (e.g. Server Error) without response body | ||
* which in many cases is crucial to determine the resons why error was returned. | ||
* | ||
* It may be made redundant once migrated to other HTTP library. | ||
*/ | ||
@CompileStatic | ||
class NexusHttpResponseException extends NexusStagingException { | ||
|
||
final int statusCode | ||
|
||
NexusHttpResponseException(int statusCode, String message, Throwable cause) { | ||
super(message, cause) | ||
this.statusCode = statusCode | ||
} | ||
} |
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
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
20 changes: 20 additions & 0 deletions
20
src/main/groovy/io/codearte/gradle/nexus/logic/RepositoryDropper.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,20 @@ | ||
package io.codearte.gradle.nexus.logic | ||
|
||
import groovy.transform.CompileStatic | ||
import groovy.transform.InheritConstructors | ||
import groovy.util.logging.Slf4j | ||
import org.gradle.api.Incubating | ||
|
||
@CompileStatic | ||
@InheritConstructors | ||
@Slf4j | ||
@Incubating | ||
class RepositoryDropper extends AbstractStagingOperationExecutor { | ||
|
||
void dropRepositoryWithIdAndStagingProfileId(String repositoryId, String stagingProfileId) { | ||
log.info("Droping repository '$repositoryId' with staging profile '$stagingProfileId'") | ||
Map<String, Map> postContent = prepareStagingPostContentWithGivenRepositoryIdAndStagingId(repositoryId, stagingProfileId) | ||
client.post(nexusUrl + "/staging/profiles/$stagingProfileId/drop", postContent) | ||
log.info("Repository '$repositoryId' with staging profile '$stagingProfileId' has been dropped") | ||
} | ||
} |
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
9 changes: 9 additions & 0 deletions
9
src/test/groovy/io/codearte/gradle/nexus/FunctionalTestConstants.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,9 @@ | ||
package io.codearte.gradle.nexus | ||
|
||
//Separate interface as there is problem with constants visibility in traits | ||
interface FunctionalTestConstants { | ||
|
||
public static final String E2E_SERVER_BASE_PATH = "https://oss.sonatype.org/service/local/" | ||
public static final String E2E_PACKAGE_GROUP = 'io.gitlab.nexus-at' | ||
public static final String E2E_STAGING_PROFILE_ID = "5027d084a01a3a" | ||
} |
20 changes: 20 additions & 0 deletions
20
src/test/groovy/io/codearte/gradle/nexus/FunctionalTestHelperTrait.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,20 @@ | ||
package io.codearte.gradle.nexus | ||
|
||
import groovy.transform.CompileStatic | ||
|
||
@CompileStatic | ||
trait FunctionalTestHelperTrait implements FunctionalTestConstants { | ||
|
||
private static final String NEXUS_USERNAME_AT_ENVIRONMENT_VARIABLE_NAME = 'nexusUsernameAT' | ||
private static final String NEXUS_PASSWORD_AT_ENVIRONMENT_VARIABLE_NAME = 'nexusPasswordAT' | ||
|
||
String getNexusUsernameAT() { | ||
return System.getenv(NEXUS_USERNAME_AT_ENVIRONMENT_VARIABLE_NAME) ?: 'nexus-at' | ||
} | ||
|
||
//Temporary hack to read nexus password in e2e tests | ||
String tryToReadNexusPasswordAT() { | ||
return System.getenv(NEXUS_PASSWORD_AT_ENVIRONMENT_VARIABLE_NAME) ?: { throw new RuntimeException( | ||
"Nexus password for AT tests is not set in a system variable '$NEXUS_PASSWORD_AT_ENVIRONMENT_VARIABLE_NAME'") }() | ||
} | ||
} |
12 changes: 0 additions & 12 deletions
12
src/test/groovy/io/codearte/gradle/nexus/PasswordUtil.groovy
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.