From 2b80ed743a36464377d6ab438f2ef59d4b550d9b Mon Sep 17 00:00:00 2001 From: Terence Lim Date: Sat, 11 Mar 2023 10:55:09 +0800 Subject: [PATCH] Standardize schema file copy --- .github/workflows/release.yml | 12 ++++++++++++ Dockerfile | 4 ++-- treatment-service/Dockerfile | 2 -- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f70ed0d6..2bd1cd3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,6 +82,12 @@ jobs: name: xp-ui-dist path: ui/build + - name: Download Management Service binary + uses: actions/download-artifact@v2 + with: + name: management-service-binary + path: management-service/bin/ + - name: Build Docker image id: build-image run: | @@ -114,6 +120,12 @@ jobs: with: fetch-depth: 0 + - name: Download Treatment Service binary + uses: actions/download-artifact@v2 + with: + name: treatment-service-binary + path: treatment-service/bin/ + - name: Build Docker image id: build-image working-directory: treatment-service diff --git a/Dockerfile b/Dockerfile index 89ee2699..193c579c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,8 +35,8 @@ RUN addgroup -S ${XP_USER_GROUP} \ && mkdir /app \ && chown -R ${XP_USER}:${XP_USER_GROUP} /app -COPY --from=api-builder --chown=${XP_USER}:${XP_USER_GROUP} /app/api/experiments.yaml /app/ -COPY --from=api-builder --chown=${XP_USER}:${XP_USER_GROUP} /app/api/schema.yaml /app/ +COPY --chown=${XP_USER}:${XP_USER_GROUP} management-service/bin/experiments.yaml /app/ +COPY --chown=${XP_USER}:${XP_USER_GROUP} management-service/bin/schema.yaml /app/ COPY --from=api-builder --chown=${XP_USER}:${XP_USER_GROUP} /app/management-service/bin/* /app/ COPY --from=api-builder --chown=${XP_USER}:${XP_USER_GROUP} /app/management-service/database /app/database/ diff --git a/treatment-service/Dockerfile b/treatment-service/Dockerfile index 82031b53..b8f56e97 100644 --- a/treatment-service/Dockerfile +++ b/treatment-service/Dockerfile @@ -21,8 +21,6 @@ FROM alpine:latest RUN apk update && apk add git make bash unzip libtool ca-certificates dumb-init tzdata RUN mkdir -p /opt/xp_treatment -COPY --from=api-builder --chown=${XP_USER}:${XP_USER_GROUP} /app/api/treatment.yaml /opt/xp_treatment/ -COPY --from=api-builder --chown=${XP_USER}:${XP_USER_GROUP} /app/api/schema.yaml /opt/xp_treatment/ COPY --from=api-builder /app/bin/* /opt/xp_treatment/ WORKDIR /opt/xp_treatment