Commit 925e7deb authored by ioangut's avatar ioangut
Browse files

Use sap machine for upload service and parse the pod name

parent 4d18381f
......@@ -27,12 +27,9 @@ RUN mkdir -p /usr/sap/upload-service
# hadolint ignore=SC2086
RUN ${WORK_DIR}/mvnw --batch-mode -DskipTests=true --file ${WORK_DIR}/pom.xml ${MAVEN_ARGS} clean install
RUN cp ${WORK_DIR}/services/upload/target/upload-*.jar /usr/sap/upload-service/upload.jar
RUN cp ${WORK_DIR}/scripts/DpkgHelper.java /DpkgHelper.java
FROM gcr.io/distroless/java:11
COPY --from=build /DpkgHelper.java .
FROM sapmachine:11.0.8
COPY --from=build /usr/sap/upload-service/upload.jar .
RUN ["java", "DpkgHelper.java"]
USER 65534:65534
ENTRYPOINT ["/usr/bin/java", "-Djdk.tls.namedGroups=\"secp256r1,secp384r1,brainpoolP256r1,brainpoolP384r1,brainpoolP512r1,ffdhe2048,ffdhe3072,ffdhe4096\"", "-jar"]
CMD ["upload.jar"]
......@@ -8,14 +8,13 @@ import app.coronawarn.server.services.federation.upload.config.UploadServiceConf
import app.coronawarn.server.services.federation.upload.payload.signing.BatchSigner;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.StringUtils;
import org.bouncycastle.cms.CMSException;
import org.bouncycastle.operator.OperatorCreationException;
import org.slf4j.Logger;
......@@ -34,9 +33,10 @@ public class PayloadFactory {
/**
* PayloadFactory.
*
* @param assembler .
* @param signer .
* @param config .
* @param signer .
* @param config .
*/
public PayloadFactory(DiagnosisKeyBatchAssembler assembler, BatchSigner signer, UploadServiceConfig config) {
this.assembler = assembler;
......@@ -64,7 +64,7 @@ public class PayloadFactory {
currentTime.getYear(),
currentTime.getMonth().getValue(),
currentTime.getDayOfMonth(),
this.batchId,
StringUtils.substringAfter(this.batchId, "-"),
counter);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment