.github/workflows/release.yml
... ...
@@ -100,7 +100,11 @@ jobs:
100 100
- shell: bash
101 101
env: # Or as an environment variable
102 102
TMP: /mnt/tmp
103
- APP_PARAMETERS: "-Daws.region=eu-west-1 -Dgoogle.maps.authenticationparams=${{ secrets.GOOGLE_MAPS_AUTHENTICATIONPARAMS }} -Daws.s3.test.s3AccessId=${{ secrets.AWS_S3_TEST_S3ACCESSID }} -Daws.s3.test.s3AccessKey=${{ secrets.AWS_S3_TEST_S3ACCESSKEY }} -Dgeonames.org.usernames=${{ secrets.GEONAMES_ORG_USERNAMES }}"
103
+ AWS_S3_TEST_S3ACCESSID: ${{ secrets.AWS_S3_TEST_S3ACCESSID }}
104
+ AWS_S3_TEST_S3ACCESSKEY: ${{ secrets.AWS_S3_TEST_S3ACCESSKEY }}
105
+ GEONAMES_ORG_USERNAMES: ${{ secrets.GEONAMES_ORG_USERNAMES }}
106
+ GOOGLE_MAPS_AUTHENTICATION_PARAMS: ${{ secrets.GOOGLE_MAPS_AUTHENTICATIONPARAMS }}
107
+ APP_PARAMETERS: "-Daws.region=eu-west-1"
104 108
JAVA8_HOME: ${{env.JAVA_HOME_8_X64}}
105 109
run: |
106 110
./configuration/buildAndUpdateProduct.sh -x ${{ github.event.inputs.runner_cpus == '' && '4' || github.event.inputs.runner_cpus }} ${{ github.event.inputs.skip_tests == 'true' && '-t' || '' }} ${{ github.event.inputs.local_target_platform == 'true' && '-v' || '' }} build 2>&1
... ...
@@ -180,7 +184,7 @@ jobs:
180 184
asset_name: release-notes.txt
181 185
asset_content_type: text/plain
182 186
- name: Trigger Hudson job
183
- if: always()
187
+ if: {{ always() && secrets.HUDSON_JOB_USERNAME != '' && secrets.HUDSON_JOB_PASSWORD != '' && secrets.HUDSON_JOB_TOKEN != '' }}
184 188
shell: bash
185 189
run: |
186 190
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
java/com.sap.sailing.geocoding/src/com/sap/sailing/geocoding/impl/ReverseGeocoderImpl.java
... ...
@@ -14,6 +14,7 @@ import java.util.Collections;
14 14
import java.util.Comparator;
15 15
import java.util.Iterator;
16 16
import java.util.List;
17
+import java.util.Optional;
17 18
import java.util.Random;
18 19
import java.util.TimeZone;
19 20
import java.util.logging.Level;
... ...
@@ -36,7 +37,21 @@ import com.sap.sse.common.Util;
36 37
import com.sap.sse.util.HttpUrlConnectionHelper;
37 38
38 39
public class ReverseGeocoderImpl implements ReverseGeocoder {
40
+ /**
41
+ * The system property name to get the comma separated list of geonames.org usernames; takes precedence over
42
+ * the environment variable whose name is given by {@link #USERNAMES_ENV_VARIABLE_NAME}.
43
+ */
39 44
private static final String USERNAMES_SYSTEM_PROPERTY_NAME = "geonames.org.usernames";
45
+
46
+ /**
47
+ * The environment variable name to get the comma separated list of geonames.org usernames. Not evaluated
48
+ * if the system property whose name is given by {@link #USERNAMES_SYSTEM_PROPERTY_NAME} is set.
49
+ */
50
+ private static final String USERNAMES_ENV_VARIABLE_NAME = "GEONAMES_ORG_USERNAMES";
51
+
52
+ /**
53
+ * Default username in case neither system property nor environment variable is set.
54
+ */
40 55
private static final String GEONAMES_DEFAULT_USER_NAME = "sailtracking0";
41 56
42 57
private static final String DATES = "dates";
... ...
@@ -63,7 +78,8 @@ public class ReverseGeocoderImpl implements ReverseGeocoder {
63 78
private static final Logger logger = Logger.getLogger(ReverseGeocoderImpl.class.getName());
64 79
65 80
public ReverseGeocoderImpl() {
66
- final String commaSeparatedUsernames = System.getProperty(USERNAMES_SYSTEM_PROPERTY_NAME, GEONAMES_DEFAULT_USER_NAME);
81
+ final String commaSeparatedUsernames = System.getProperty(USERNAMES_SYSTEM_PROPERTY_NAME,
82
+ Optional.ofNullable(System.getenv(USERNAMES_ENV_VARIABLE_NAME)).orElse(GEONAMES_DEFAULT_USER_NAME));
67 83
this.usernames = commaSeparatedUsernames.split(",");
68 84
}
69 85
java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/Activator.java
... ...
@@ -1,5 +1,7 @@
1 1
package com.sap.sailing.gwt.ui.server;
2 2
3
+import java.util.Optional;
4
+
3 5
import org.osgi.framework.BundleActivator;
4 6
import org.osgi.framework.BundleContext;
5 7
... ...
@@ -10,11 +12,31 @@ public class Activator implements BundleActivator {
10 12
private SailingServiceImpl sailingServiceToStopWhenStopping;
11 13
private static Activator INSTANCE;
12 14
15
+ /**
16
+ * If the system property named after this constant is set, its value is used for Google Maps API authentication.
17
+ * It takes precedence over the environment variable named after {@link #GOOGLE_MAPS_LOADER_AUTHENTICATION_PARAMS_ENV_VAR_NAME}.
18
+ */
13 19
private final static String GOOGLE_MAPS_LOADER_AUTHENTICATION_PARAMS_PROPERTY_NAME = "google.maps.authenticationparams";
14 20
21
+ /**
22
+ * If the system property named after {@link #GOOGLE_MAPS_LOADER_AUTHENTICATION_PARAMS_PROPERTY_NAME} is not set,
23
+ * this environment variable is checked for Google Maps API authentication parameters.
24
+ */
25
+ private final static String GOOGLE_MAPS_LOADER_AUTHENTICATION_PARAMS_ENV_VAR_NAME = "GOOGLE_MAPS_AUTHENTICATION_PARAMS";
26
+
27
+ /**
28
+ * The system property named after this constant is expected to provide the YouTube V3 API key. Takes precedence over
29
+ * the environment variable named after {@link #YOUTUBE_V3_API_KEY_ENV_VAR_NAME}.
30
+ */
15 31
private final static String YOUTUBE_V3_API_KEY_PROPERTY_NAME = "youtube.api.key";
16 32
17 33
/**
34
+ * If the system property named after {@link #YOUTUBE_V3_API_KEY_PROPERTY_NAME} is not set, this environment variable
35
+ * is checked for the YouTube V3 API key.
36
+ */
37
+ private final static String YOUTUBE_V3_API_KEY_ENV_VAR_NAME = "YOUTUBE_V3_API_KEY";
38
+
39
+ /**
18 40
* Required by {@link GoogleMapsLoader#load(Runnable, String)} and to be provided through a system property named
19 41
* after {@link GOOGLE_MAPS_LOADER_AUTHENTICATION_PARAMS_PROPERTY_NAME}. The value would be something like
20 42
* {@code client=abcde&channel=fghij}.
... ...
@@ -34,8 +56,12 @@ public class Activator implements BundleActivator {
34 56
@Override
35 57
public void start(BundleContext context) throws Exception {
36 58
Activator.context = context;
37
- googleMapsLoaderAuthenticationParams = context.getProperty(GOOGLE_MAPS_LOADER_AUTHENTICATION_PARAMS_PROPERTY_NAME);
38
- youtubeApiKey = context.getProperty(YOUTUBE_V3_API_KEY_PROPERTY_NAME);
59
+ googleMapsLoaderAuthenticationParams = Optional
60
+ .ofNullable(context.getProperty(GOOGLE_MAPS_LOADER_AUTHENTICATION_PARAMS_PROPERTY_NAME))
61
+ .orElse(System.getenv(GOOGLE_MAPS_LOADER_AUTHENTICATION_PARAMS_ENV_VAR_NAME));
62
+ youtubeApiKey = Optional
63
+ .ofNullable(context.getProperty(YOUTUBE_V3_API_KEY_PROPERTY_NAME))
64
+ .orElse(System.getenv(YOUTUBE_V3_API_KEY_ENV_VAR_NAME));
39 65
}
40 66
41 67
@Override
java/com.sap.sailing.www/release_notes_admin.html
... ...
@@ -36,6 +36,15 @@
36 36
The API token also replaces the username/password authentication scheme for the update
37 37
back channel from which TracTrac can optionally receive updates coming from the Race
38 38
Manager app, such as race start times, race aborts, or course configurations.</li>
39
+ <li>For the following system properties, alternative environment variables have been introduced:
40
+ <ul>
41
+ <li><tt>AWS_S3_TEST_S3ACCESSID</tt> for <tt>aws.s3.test.s3AccessId</tt></li>
42
+ <li><tt>AWS_S3_TEST_S3ACCESSKEY</tt> for <tt>aws.s3.test.s3AccessKey</tt></li>
43
+ <li><tt>GOOGLE_MAPS_AUTHENTICATION_PARAMS</tt> for <tt>google.maps.authenticationparams</tt></li>
44
+ <li><tt>YOUTUBE_V3_API_KEY</tt> for <tt>youtube.api.key</tt></li>
45
+ <li><tt>GEONAMES_ORG_USERNAMES</tt> for <tt>geonames.org.usernames</tt></li>
46
+ </ul>
47
+ If the system property is set, it takes precedence over the environment variable.</li>
39 48
</ul>
40 49
<h2 class="articleSubheadline">September 2025</h2>
41 50
<ul class="bulletList">
java/com.sap.sse.filestorage/src/com/sap/sse/filestorage/testsupport/AmazonS3TestSupport.java
... ...
@@ -8,17 +8,20 @@ import com.sap.sse.filestorage.impl.BaseFileStorageServiceImpl;
8 8
import com.sap.sse.security.SecurityService;
9 9
10 10
/**
11
- * Provide the S3 credentials for an IAM account that has access to the "sapsailing-automatic-upload-test" bucket
12
- * in the system properties {@code aws.s3.test.s3AccessId} and {@code aws.s3.test.s3AccessKey}. For the build
13
- * script in {@code configuration/buildAndUpdateProduct.sh} this can be done by setting the {@code APP_PARAMETERS}
14
- * environment variable for the script like this: {@code APP_PARAMETERS="-Daws.s3.test.s3AccessId=... -Daws.s3.test.s3AccessKey=..."}
11
+ * Provide the S3 credentials for an IAM account that has access to the "sapsailing-automatic-upload-test" bucket in the
12
+ * system properties {@code aws.s3.test.s3AccessId} and {@code aws.s3.test.s3AccessKey}. For the build script in
13
+ * {@code configuration/buildAndUpdateProduct.sh} this can be done by setting the {@code APP_PARAMETERS} environment
14
+ * variable for the script like this:
15
+ * {@code APP_PARAMETERS="-Daws.s3.test.s3AccessId=... -Daws.s3.test.s3AccessKey=..."}. Alternatively, e.g., in order to
16
+ * avoid system property setting with the "-D" command line option to be shown in log files, you may pass the ID and key
17
+ * as environment variables {@code AWS_S3_TEST_S3ACCESSID} and {@code AWS_S3_TEST_S3ACCESSKEY}, respectively.
15 18
*
16 19
* @author Axel Uhl (d043530)
17 20
*
18 21
*/
19 22
public class AmazonS3TestSupport {
20
- public static final String s3AccessId = System.getProperty("aws.s3.test.s3AccessId");
21
- public static final String s3AccessKey = System.getProperty("aws.s3.test.s3AccessKey");
23
+ public static final String s3AccessId = System.getProperty("aws.s3.test.s3AccessId", System.getenv("AWS_S3_TEST_S3ACCESSID"));
24
+ public static final String s3AccessKey = System.getProperty("aws.s3.test.s3AccessKey", System.getenv("AWS_S3_TEST_S3ACCESSKEY"));
22 25
private static final String s3BucketName = "sapsailing-automatic-upload-test";
23 26
24 27
public static BaseFileStorageServiceImpl createService(final SecurityService securityService) throws InvalidPropertiesException, IOException {