-
Notifications
You must be signed in to change notification settings - Fork 17
Refactor LogStorageFactory implementation to use Descriptor/Describable pattern
#132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c75dec4
af06f01
cf35a61
b7a18c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,8 +14,8 @@ | |
| <properties> | ||
| <changelist>999999-SNAPSHOT</changelist> | ||
| <!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ --> | ||
| <jenkins.baseline>2.492</jenkins.baseline> | ||
| <jenkins.version>${jenkins.baseline}.3</jenkins.version> | ||
| <jenkins.baseline>2.504</jenkins.baseline> | ||
| <jenkins.version>${jenkins.baseline}.1</jenkins.version> | ||
| <useBeta>true</useBeta> | ||
| <gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo> | ||
| </properties> | ||
|
|
@@ -54,6 +54,22 @@ | |
| <scope>import</scope> | ||
| <type>pom</type> | ||
| </dependency> | ||
| <dependency> | ||
| <!-- TODO: https://github.com/jenkinsci/workflow-api-plugin/pull/417 --> | ||
| <!-- TODO: Remove when included in BOM --> | ||
| <groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
| <artifactId>workflow-api</artifactId> | ||
| <version>1397.v02e97a_30f3ce</version> | ||
| </dependency> | ||
| <dependency> | ||
| <!-- TODO: https://github.com/jenkinsci/workflow-api-plugin/pull/417 --> | ||
| <!-- TODO: Remove when included in BOM --> | ||
| <groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
| <artifactId>workflow-api</artifactId> | ||
| <version>1397.v02e97a_30f3ce</version> | ||
| <classifier>tests</classifier> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| </dependencyManagement> | ||
| <dependencies> | ||
|
|
@@ -116,6 +132,12 @@ | |
| <version>2.31.33</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>software.amazon.awssdk</groupId> | ||
| <artifactId>ssooidc</artifactId> | ||
| <version>2.31.33</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
Comment on lines
+135
to
+140
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I needed this to do basic testing directly against the AWS credentials available in my organization. It doesn't work for testing stuff related to the agent role assumption logic (seems like it should be possible with
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I confirmed that this is required even after getting |
||
| </dependencies> | ||
| <build> | ||
| <plugins> | ||
|
|
@@ -140,4 +162,31 @@ | |
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| <profiles> | ||
| <profile> | ||
| <id>cloudwatch-logs-settings</id> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| <activation> | ||
| <property> | ||
| <name>CLOUDWATCH_LOG_GROUP_NAME</name> | ||
| </property> | ||
| </activation> | ||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-surefire-plugin</artifactId> | ||
| <configuration> | ||
| <environmentVariables> | ||
| <AWS_PROFILE>${AWS_PROFILE}</AWS_PROFILE> | ||
| <AWS_ROLE>${AWS_ROLE}</AWS_ROLE> | ||
| <AWS_CHAINED_ROLE>${AWS_CHAINED_ROLE}</AWS_CHAINED_ROLE> | ||
| <AWS_REGION>${AWS_REGION}</AWS_REGION> | ||
| <CLOUDWATCH_LOG_GROUP_NAME>${CLOUDWATCH_LOG_GROUP_NAME}</CLOUDWATCH_LOG_GROUP_NAME> | ||
| </environmentVariables> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </profile> | ||
| </profiles> | ||
| </project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -142,7 +142,7 @@ | |
| // TODO should also check DescribeLogStreams, and perhaps even CreateLogStream and PutLogEvents, to ensure roles are correct | ||
| } catch (Exception x) { | ||
| String msg = processExceptionMessage(x); | ||
| return FormValidation.error(StringUtils.abbreviate(msg, 200)); | ||
| return FormValidation.error(abbreviate ? StringUtils.abbreviate(msg, 200) : msg); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this was just missed in #64. I needed the full message to debug some errors while I was configuring things for the tests. |
||
| } | ||
| try { | ||
| String message = LogStreamState.validate(logGroupName); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just making it a bit easier to run the tests, see also the changes in
pom.xml.