From 023876e8986c779700ca8c95d13f09f8ebb3b83f Mon Sep 17 00:00:00 2001 From: dfeldick Date: Fri, 10 May 2024 14:21:07 -0700 Subject: [PATCH] APIGOV-27565 - test --- .github/workflows/build-docker-images.yml | 3 ++- discovery/docker/Dockerfile | 2 +- traceability/docker/Dockerfile | 17 ++++------------- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index d6d4879..ea5a21c 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -60,7 +60,7 @@ jobs: sdk_version=${{ steps.vars.outputs.sdkversion }} commit_id=${{ steps.vars.outputs.commit }} - buildtraceabilityAgentDocker: + buildTraceabilityAgentDocker: needs: testTraceabilityAgent env: GOFLAGS: "-mod=mod" @@ -109,6 +109,7 @@ jobs: commit_id=${{ steps.vars.outputs.commit }} notifyTeamsChannel: + needs: [buildDiscoveryAgentDocker, buildTraceabilityAgentDocker] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/discovery/docker/Dockerfile b/discovery/docker/Dockerfile index 9418bae..4273cb7 100644 --- a/discovery/docker/Dockerfile +++ b/discovery/docker/Dockerfile @@ -35,7 +35,7 @@ RUN export GOOS=linux && \ # Create non-root user RUN addgroup -g 2500 ${APP_USER} && adduser -u 2500 -D -G ${APP_USER} ${APP_USER} -RUN chown -R ${APP_USER}:${APP_USER} ${BASEPATH}/bin/apigee_discovery_agent +RUN chown -R ${APP_USER}:${APP_USER} ${AGENT}/bin/apigee_discovery_agent USER ${APP_USER} # alpine 3.19 linux/amd64 diff --git a/traceability/docker/Dockerfile b/traceability/docker/Dockerfile index b8b7546..eb2d47d 100644 --- a/traceability/docker/Dockerfile +++ b/traceability/docker/Dockerfile @@ -23,17 +23,6 @@ COPY . . WORKDIR ${AGENT} -RUN export time=`date +%Y%m%d%H%M%S` && \ - export GOOS=linux && \ - export GOARCH=amd64 && \ - go build -tags static_all \ - -ldflags="-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildTime=${time}' \ - -X 'github.com/Axway/agent-sdk/pkg/cmd.BuildVersion=${version}' \ - -X 'github.com/Axway/agent-sdk/pkg/cmd.BuildCommitSha=${commit_id}' \ - -X 'github.com/Axway/agent-sdk/pkg/cmd.SDKBuildVersion=${sdk_version}' \ - -X 'github.com/Axway/agent-sdk/pkg/cmd.BuildAgentName=ApigeeTraceabilityAgent'" \ - -a -o ${AGENT}/bin/apigee_traceability_agent ${BASEPATH}/traceability/main.go - # Copy necessary files COPY . . @@ -51,7 +40,7 @@ RUN export GOOS=linux && \ # Create non-root user RUN addgroup -g 2500 ${APP_USER} && adduser -u 2500 -D -G ${APP_USER} ${APP_USER} -RUN chown -R ${APP_USER}:${APP_USER} /go/src/github.com/Axway/agents-apigee/traceability/bin/apigee_traceability_agent +RUN chown -R ${APP_USER}:${APP_USER} ${AGENT}/bin/apigee_traceability_agent USER ${APP_USER} # alpine 3.18 linux/amd64 @@ -61,10 +50,12 @@ ENV BASEPATH /go/src/github.com/Axway/agents-apigee ENV AGENT ${BASEPATH}/discovery ENV APP_USER axway +RUN pwd +RUN ls -laR COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=builder /etc/passwd /etc/passwd -COPY --from=builder ${AGENT}/apigee_traceability_agent.yml /apigee_traceability_agent.yml COPY --from=builder ${AGENT}/bin/apigee_traceability_agent /apigee_traceability_agent +COPY --from=builder ${AGENT}/apigee_traceability_agent.yml /apigee_traceability_agent.yml RUN apk --no-cache add openssl libssl3 libcrypto3 musl musl-utils libc6-compat busybox curl && \ mkdir /keys /data && \