Skip to content

Commit dde5792

Browse files
authored
ci: Add flagsmith-api-private-test image build (#6543)
1 parent 4ce72ad commit dde5792

3 files changed

Lines changed: 39 additions & 4 deletions

File tree

.github/workflows/platform-docker-build-test-publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ jobs:
5858
image-name: flagsmith-api-test
5959
scan: false
6060

61+
docker-build-api-private-test:
62+
name: Build API Enterprise Test Image
63+
uses: ./.github/workflows/.reusable-docker-build.yml
64+
with:
65+
target: api-private-test
66+
image-name: flagsmith-api-private-test
67+
scan: false
68+
secrets:
69+
secrets: |
70+
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
71+
6172
docker-build-e2e:
6273
name: Build E2E Image
6374
uses: ./.github/workflows/.reusable-docker-build.yml

.github/workflows/platform-pull-request.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
"test": "testing",
4444
"chore": "chore"
4545
}
46-
ignored_types: '[]'
46+
ignored_types: "[]"
4747

4848
docker-prepare-report-comment:
4949
if: github.event.pull_request.draft == false && needs.permissions-check.outputs.can-write == 'true'
@@ -104,6 +104,19 @@ jobs:
104104
comment: ${{ needs.docker-prepare-report-comment.result == 'success' }}
105105
scan: false
106106

107+
docker-build-api-private-test:
108+
if: needs.permissions-check.outputs.can-write == 'true'
109+
needs: [permissions-check, docker-prepare-report-comment]
110+
name: Build API Enterprise Test Image
111+
uses: ./.github/workflows/.reusable-docker-build.yml
112+
with:
113+
target: api-private-test
114+
image-name: flagsmith-api-private-test
115+
scan: false
116+
secrets:
117+
secrets: |
118+
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
119+
107120
docker-build-e2e:
108121
if: github.event.pull_request.draft == false && !cancelled()
109122
needs: [permissions-check, docker-prepare-report-comment]

Dockerfile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
# - Internal stages
4141
# * api-test [build-python]
42+
# * api-private-test [build-python-private]
4243

4344
# - Target (shippable) stages
4445
# * private-cloud-api [api-runtime-private, build-python-private]
@@ -158,13 +159,23 @@ RUN apk add xmlsec
158159
# * api-test [build-python]
159160
FROM build-python AS api-test
160161

162+
COPY api /build/
163+
161164
RUN make install-packages opts='--with dev'
162165

163-
WORKDIR /app
166+
CMD ["make", "test"]
164167

165-
COPY api /app/
168+
# * api-private-test [build-python-private]
169+
FROM build-python-private AS api-private-test
170+
171+
COPY api /build/
172+
173+
RUN make install-packages opts='--with dev' && \
174+
make integrate-private-tests && \
175+
git config --global --unset credential.helper && \
176+
rm -f ${HOME}/.git-credentials
166177

167-
CMD ["make test"]
178+
CMD ["make", "test"]
168179

169180
# - Target (shippable) stages
170181
# * private-cloud-api [api-runtime-private, build-python-private]

0 commit comments

Comments
 (0)