Commit 0184fb3d authored by MANISH KUMAR's avatar MANISH KUMAR
Browse files

Removing hardened container and enabling preagg metrices

parent a88f86c1
Pipeline #37961 passed with stage
in 8 seconds
......@@ -144,11 +144,24 @@ azure_containerize:
script:
# Dockerfile
- |
echo 'FROM community.opengroup.org:5555/osdu/platform/deployment-and-operations/base-containers-azure/alpine-zulu8:0.0.1
echo 'FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAR_FILE
ARG APPLICATIONINSIGHTS_INSTRUMENTATION_KEY
RUN apk add --update \
curl
ARG AGENT_VERSION=3.0.2
# Application Insights Agent
RUN mkdir -p /opt/agents \
&& chmod g+rwx /opt/agents \
&& curl -i -k -L https://github.com/microsoft/ApplicationInsights-Java/releases/download/${AGENT_VERSION}/applicationinsights-agent-${AGENT_VERSION}.jar -o /opt/agents/applicationinsights-agent-${AGENT_VERSION}.jar \
&& chmod 444 /opt/agents/applicationinsights-agent-${AGENT_VERSION}.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]' > Dockerfile
ENV APPLICATIONINSIGHTS_CONNECTION_STRING=${APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}
ENTRYPOINT ["java","-jar","-javaagent:/opt/agents/applicationinsights-agent-${AGENT_VERSION}.jar","/app.jar"]' > Dockerfile
- |
if [ "$AZURE_SERVICE" == "entitlements" ]; then
TARGET=$(find ./$AZURE_BUILD_SUBDIR/target -name '*.jar' |head -n 1)
......@@ -158,7 +171,7 @@ azure_containerize:
# Gitlab Container Registry
- echo "Startup Jar is $TARGET"
- docker build --build-arg JAR_FILE=$TARGET -t $CI_REGISTRY_IMAGE/$SHA_IMAGE .
- docker build --build-arg JAR_FILE=$TARGET --build-arg APPLICATIONINSIGHTS_INSTRUMENTATION_KEY=$AZURE_APPINSIGHTS_KEY -t $CI_REGISTRY_IMAGE/$SHA_IMAGE .
- docker push ${CI_REGISTRY_IMAGE}/$SHA_IMAGE
- docker tag $CI_REGISTRY_IMAGE/$SHA_IMAGE $CI_REGISTRY_IMAGE/$LATEST_IMAGE
- docker push ${CI_REGISTRY_IMAGE}/$LATEST_IMAGE
......
Markdown is supported
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