Skip to content

Commit 169f220

Browse files
committed
Fix Sonar GHA workflow to adapt for Config Server docker changes
1 parent cef1a9e commit 169f220

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/sonarcube.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ jobs:
4545
eureka.client.serviceUrl.defaultZone: http://eurekaServer:8761/eureka
4646
eureka.instance.hostname: localhost
4747
eureka.instance.instanceId: localhost:configServer:8888
48+
encrypt.keyStore.location: file:///workspace/server.jks
49+
encrypt.keyStore.password: letmein
50+
encrypt.keyStore.alias: mytestkey
51+
encrypt.rsa.algorithm: OAEP
52+
encrypt.rsa.salt: deadbeef
53+
encrypt.rsa.strong: "false"
54+
options: --name steeltoe-config
4855
ports:
4956
- 8888:8888
5057

@@ -67,6 +74,15 @@ jobs:
6774
# Sonar: Shallow clones should be disabled for a better relevancy of analysis.
6875
fetch-depth: 0
6976

77+
- name: Provide jks file for Config Server container
78+
if: ${{ matrix.runDockerContainers }}
79+
# The Config Server container starts before checkout, when server.jks is not yet available.
80+
# Copy it into the container now and restart so Config Server can pick up the keystore.
81+
shell: bash
82+
run: |
83+
docker cp src/Configuration/test/Encryption.Test/Cryptography/server.jks steeltoe-config:/workspace/server.jks
84+
docker restart steeltoe-config
85+
7086
- name: Begin Sonar .NET scanner
7187
id: sonar_begin
7288
env:

0 commit comments

Comments
 (0)