Skip to content

Commit 4b14063

Browse files
committed
Merge branch 'main' into fix/rebind-restore-field-initializers
2 parents 49a9ec2 + 56d7730 commit 4b14063

6 files changed

Lines changed: 56 additions & 8 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Spring Cloud Commons CI Job
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 4.3.x
8+
9+
# Scheduled builds run daily at midnight UTC
10+
schedule:
11+
- cron: '0 0 * * *'
12+
13+
# Manual trigger with optional branch override
14+
workflow_dispatch:
15+
inputs:
16+
branches:
17+
description: "Which branch should be built (can be a comma-separated list of branches)"
18+
required: true
19+
default: 'main'
20+
type: string
21+
22+
jobs:
23+
deploy:
24+
uses: spring-cloud/spring-cloud-github-actions/.github/workflows/deploy.yml@main
25+
with:
26+
branches: ${{ inputs.branches }}
27+
secrets:
28+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
29+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
30+
COMMERCIAL_ARTIFACTORY_USERNAME: ${{ secrets.COMMERCIAL_ARTIFACTORY_USERNAME }}
31+
COMMERCIAL_ARTIFACTORY_PASSWORD: ${{ secrets.COMMERCIAL_ARTIFACTORY_PASSWORD }}
32+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
33+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/maven.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
name: Build
55

66
on:
7-
push:
8-
branches: [ main, 4.3.x, 4.2.x, 4.1.x ]
97
pull_request:
108
branches: [ main, 4.3.x, 4.2.x, 4.1.x ]
119

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@antora/atlas-extension": "1.0.0-alpha.5",
55
"@antora/collector-extension": "1.0.3",
66
"@asciidoctor/tabs": "1.0.0-beta.6",
7-
"@springio/antora-extensions": "1.14.7",
8-
"@springio/asciidoctor-extensions": "1.0.0-alpha.17"
7+
"@springio/antora-extensions": "1.14.10",
8+
"@springio/asciidoctor-extensions": "1.0.0-alpha.18"
99
}
1010
}

docs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<maven-deploy-plugin-default.phase>none</maven-deploy-plugin-default.phase>
2222

2323
<!-- Observability -->
24-
<micrometer-docs-generator.version>1.0.2</micrometer-docs-generator.version>
24+
<micrometer-docs-generator.version>1.0.4</micrometer-docs-generator.version>
2525
<micrometer-docs-generator.inputPath>${maven.multiModuleProjectDirectory}/spring-cloud-commons/</micrometer-docs-generator.inputPath>
2626
<micrometer-docs-generator.inclusionPattern>.*</micrometer-docs-generator.inclusionPattern>
2727
<micrometer-docs-generator.outputPath>${maven.multiModuleProjectDirectory}/docs/modules/ROOT/partials/</micrometer-docs-generator.outputPath>

spring-cloud-context/src/test/java/org/springframework/cloud/context/test/TestConfigDataLocationResolver.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,28 @@ public List<TestConfigDataResource> resolve(ConfigDataLocationResolverContext co
6363
.bind("createfailsafedelegate", Bindable.of(Boolean.class))
6464
.orElse(Boolean.FALSE);
6565
if (createFailsafeDelegate) {
66+
KeyProperties keyProperties = context.getBinder()
67+
.bindOrCreate(KeyProperties.PREFIX, Bindable.of(KeyProperties.class));
68+
// Due to
69+
// https://github.com/spring-projects/spring-boot/commit/646db448ae938161279783a2d5d0bcaf297e7389
70+
// in Spring Boo 4.0.3 and beyond the initial call to resolve may not have
71+
// application-failsafe.properties
72+
// loaded so EncryptionIntegrationTests.failsafeShouldHaveDelegate will fail
73+
// when we assert TextEncryptorUtils.keysConfigured(keyProperties)
74+
// is true. application-failsafe.properties will only be available on
75+
// subsequent calls to resolve so we return
76+
// if TextEncryptorUtils.keysConfigured(keyProperties) is false. We need to
77+
// get TextEncryptor from the context
78+
// before we return so FailSafeTextEncryptor is created and used in subsequent
79+
// calls to resolve.
80+
if (!TextEncryptorUtils.keysConfigured(keyProperties)) {
81+
assertThat(context.getBootstrapContext().isRegistered(TextEncryptor.class)).isTrue();
82+
context.getBootstrapContext().get(TextEncryptor.class);
83+
return Collections.emptyList();
84+
}
6685
assertThat(context.getBootstrapContext().isRegistered(TextEncryptor.class)).isTrue();
6786
TextEncryptor textEncryptor = context.getBootstrapContext().get(TextEncryptor.class);
6887
assertThat(textEncryptor).isInstanceOf(TextEncryptorUtils.FailsafeTextEncryptor.class);
69-
KeyProperties keyProperties = context.getBinder()
70-
.bindOrCreate(KeyProperties.PREFIX, Bindable.of(KeyProperties.class));
7188
assertThat(TextEncryptorUtils.keysConfigured(keyProperties)).isTrue();
7289
RsaProperties rsaProperties = context.getBinder()
7390
.bindOrCreate(RsaProperties.PREFIX, Bindable.of(RsaProperties.class));

spring-cloud-test-support/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<description>Spring Cloud Test Support</description>
1717
<properties>
1818
<maven-resolver.version>1.9.24</maven-resolver.version>
19-
<maven.version>3.9.13</maven.version>
19+
<maven.version>3.9.14</maven.version>
2020
</properties>
2121
<dependencies>
2222
<dependency>

0 commit comments

Comments
 (0)