Skip to content

Commit f08e299

Browse files
ci: add split-testing to private cloud image (#5487)
Co-authored-by: Kim Gustyr <kim.gustyr@flagsmith.com>
1 parent 7560016 commit f08e299

File tree

5 files changed

+197
-24
lines changed

5 files changed

+197
-24
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ jobs:
5050
secrets: |
5151
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
5252
53+
docker-build-split-testing:
54+
name: Build Split Testing Image
55+
uses: ./.github/workflows/.reusable-docker-build.yml
56+
with:
57+
target: private-cloud-unified
58+
image-name: flagsmith-private-cloud-split-testing
59+
build-args: |
60+
WITH=saml,auth-controller,ldap,workflows,licensing,split-testing
61+
secrets:
62+
secrets: |
63+
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
64+
5365
docker-build-api-test:
5466
name: Build API Test Image
5567
uses: ./.github/workflows/.reusable-docker-build.yml
@@ -172,6 +184,18 @@ jobs:
172184
target-images: quay.io/${{ vars.QUAY_ORGANISATION_NAME }}/flagsmith-frontend
173185
secrets: inherit
174186

187+
docker-publish-quay-split-testing:
188+
needs: [ docker-build-split-testing, run-e2e-tests ]
189+
uses: ./.github/workflows/.reusable-docker-publish.yml
190+
if: github.event_name == 'release'
191+
with:
192+
target-registry-url: quay.io
193+
docker-username: ${{ vars.QUAY_PUBLISH_USERNAME }}
194+
docker-password-secret-name: QUAY_PUBLISH_PASSWORD
195+
source-images: ${{ needs.docker-build-split-testing.outputs.image }}
196+
target-images: quay.io/${{ vars.QUAY_ORGANISATION_NAME }}/flagsmith-split-testing
197+
secrets: inherit
198+
175199
update-charts:
176200
needs: [docker-publish-api, docker-publish-frontend, docker-publish-unified]
177201
runs-on: depot-ubuntu-latest

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,20 @@ jobs:
129129
secrets: |
130130
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
131131
132+
docker-build-split-testing:
133+
if: github.event.pull_request.draft == false && needs.permissions-check.outputs.can-write == 'true'
134+
needs: [permissions-check, docker-prepare-report-comment]
135+
name: Build Split Testing Image
136+
uses: ./.github/workflows/.reusable-docker-build.yml
137+
with:
138+
target: private-cloud-unified
139+
image-name: flagsmith-private-cloud-split-testing
140+
build-args: |
141+
WITH=saml,auth-controller,ldap,workflows,licensing,split-testing
142+
secrets:
143+
secrets: |
144+
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
145+
132146
run-e2e-tests:
133147
if: '!cancelled()'
134148
needs: [permissions-check, docker-build-api, docker-build-e2e]

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ FROM build-python AS build-python-private
108108
# and integrate private modules
109109
ARG SAML_REVISION
110110
ARG RBAC_REVISION
111+
ARG WITH="saml,auth-controller,ldap,workflows,licensing"
111112
RUN --mount=type=secret,id=github_private_cloud_token \
112113
echo "https://$(cat /run/secrets/github_private_cloud_token):@github.com" > ${HOME}/.git-credentials && \
113114
git config --global credential.helper store && \
114-
make install-packages opts='--without dev --with saml,auth-controller,ldap,workflows,licensing' && \
115+
make install-packages opts='--without dev --with ${WITH}' && \
115116
make install-private-modules
116117

117118
# * api-runtime

0 commit comments

Comments
 (0)