Skip to content

Commit 37c23c0

Browse files
authored
Merge pull request #4797 from coralproject/develop
Hotfix v9.9.7
2 parents e28762a + 914f262 commit 37c23c0

File tree

7 files changed

+159
-177
lines changed

7 files changed

+159
-177
lines changed

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,6 @@ dist
5151
__generated__
5252
**/__generated__
5353

54-
**/.next
54+
**/.next
55+
56+
gha-creds-*

.github/workflows/build-and-test.yml

Lines changed: 60 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -97,34 +97,30 @@ jobs:
9797
password: ${{ secrets.DOCKERHUB_PASSWORD }}
9898
- name: Define SHORT_SHA with commit short sha
9999
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
100-
# # Build tag push the image after a merge to develop
101-
# - name: Build and Push (develop)
102-
# if: github.ref == 'refs/heads/develop' || github.ref
103-
# run: |
104-
# docker buildx build \
105-
# --platform linux/amd64 \
106-
# --build-arg REVISION_HASH=${GITHUB_SHA} \
107-
# --tag ${{ env.IMAGE_REPOSITORY }}:develop-latest-amd64 \
108-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-develop-amd64 \
109-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-develop-amd64 \
110-
# --push \
111-
# --provenance=false \
112-
# --sbom=false \
113-
# .
100+
# Build tag push the image after a merge to develop
101+
- name: Build and Push (develop)
102+
if: github.ref == 'refs/heads/develop' || github.ref
103+
run: |
104+
docker buildx build \
105+
--platform linux/amd64 \
106+
--build-arg REVISION_HASH=${GITHUB_SHA} \
107+
--tag ${{ env.IMAGE_REPOSITORY }}:develop-latest-amd64 \
108+
--push \
109+
--provenance=false \
110+
--sbom=false \
111+
.
114112
# Build tag push the release candidate image when the branch name begins with release-
115-
# - name: Build and Push (release)
116-
# if: startsWith( github.ref, 'refs/heads/release-')
117-
# run: |
118-
# docker buildx build \
119-
# --platform linux/amd64 \
120-
# --build-arg REVISION_HASH=${GITHUB_SHA} \
121-
# --tag ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-amd64 \
122-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-release-amd64 \
123-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-release-amd64 \
124-
# --push \
125-
# --provenance=false \
126-
# --sbom=false \
127-
# .
113+
- name: Build and Push (release)
114+
if: startsWith( github.ref, 'refs/heads/release-')
115+
run: |
116+
docker buildx build \
117+
--platform linux/amd64 \
118+
--build-arg REVISION_HASH=${GITHUB_SHA} \
119+
--tag ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-amd64 \
120+
--push \
121+
--provenance=false \
122+
--sbom=false \
123+
.
128124
build-arm64:
129125
name: Build arm64
130126
runs-on: coral-ci-arm
@@ -153,34 +149,30 @@ jobs:
153149
password: ${{ secrets.DOCKERHUB_PASSWORD }}
154150
- name: Define SHORT_SHA with commit short sha
155151
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
156-
# # Build for develop branch using native docker buildx
157-
# - name: Build and Push (develop)
158-
# if: github.ref == 'refs/heads/develop'
159-
# run: |
160-
# docker buildx build \
161-
# --platform linux/arm64 \
162-
# --build-arg REVISION_HASH=${GITHUB_SHA} \
163-
# --tag ${{ env.IMAGE_REPOSITORY }}:develop-latest-arm64 \
164-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-develop-arm64 \
165-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-develop-arm64 \
166-
# --push \
167-
# --provenance=false \
168-
# --sbom=false \
169-
# .
152+
# Build for develop branch using native docker buildx
153+
- name: Build and Push (develop)
154+
if: github.ref == 'refs/heads/develop'
155+
run: |
156+
docker buildx build \
157+
--platform linux/arm64 \
158+
--build-arg REVISION_HASH=${GITHUB_SHA} \
159+
--tag ${{ env.IMAGE_REPOSITORY }}:develop-latest-arm64 \
160+
--push \
161+
--provenance=false \
162+
--sbom=false \
163+
.
170164
# Build tag push the release candidate image when the branch name begins with release-
171-
# - name: Build and Push (release)
172-
# if: startsWith( github.ref, 'refs/heads/release-')
173-
# run: |
174-
# docker buildx build \
175-
# --platform linux/arm64 \
176-
# --build-arg REVISION_HASH=${GITHUB_SHA} \
177-
# --tag ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-arm64 \
178-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-release-arm64 \
179-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-release-arm64 \
180-
# --push \
181-
# --provenance=false \
182-
# --sbom=false \
183-
# .
165+
- name: Build and Push (release)
166+
if: startsWith( github.ref, 'refs/heads/release-')
167+
run: |
168+
docker buildx build \
169+
--platform linux/arm64 \
170+
--build-arg REVISION_HASH=${GITHUB_SHA} \
171+
--tag ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-arm64 \
172+
--push \
173+
--provenance=false \
174+
--sbom=false \
175+
.
184176
create-manifest:
185177
name: Create Manifest
186178
needs: [build-arm64, build-amd64]
@@ -199,17 +191,17 @@ jobs:
199191
registry: us-east1-docker.pkg.dev
200192
username: _json_key
201193
password: ${{ secrets.GAR_JSON_KEY }}
202-
# - name: Create and Push Manifest for develop branch
203-
# if: github.ref == 'refs/heads/develop'
204-
# run: |
205-
# docker manifest create ${{ env.IMAGE_REPOSITORY }}:develop-latest \
206-
# --amend ${{ env.IMAGE_REPOSITORY }}:develop-latest-amd64 \
207-
# --amend ${{ env.IMAGE_REPOSITORY }}:develop-latest-arm64
208-
# docker manifest push ${{ env.IMAGE_REPOSITORY }}:develop-latest
209-
# - name: Create and Push Manifest for release branches
210-
# if: startsWith( github.ref, 'refs/heads/release-')
211-
# run: |
212-
# docker manifest create ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }} \
213-
# --amend ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-amd64 \
214-
# --amend ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-arm64
215-
# docker manifest push ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}
194+
- name: Create and Push Manifest for develop branch
195+
if: github.ref == 'refs/heads/develop'
196+
run: |
197+
docker manifest create ${{ env.IMAGE_REPOSITORY }}:develop-latest \
198+
--amend ${{ env.IMAGE_REPOSITORY }}:develop-latest-amd64 \
199+
--amend ${{ env.IMAGE_REPOSITORY }}:develop-latest-arm64
200+
docker manifest push ${{ env.IMAGE_REPOSITORY }}:develop-latest
201+
- name: Create and Push Manifest for release branches
202+
if: startsWith( github.ref, 'refs/heads/release-')
203+
run: |
204+
docker manifest create ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }} \
205+
--amend ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-amd64 \
206+
--amend ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-arm64
207+
docker manifest push ${{ env.IMAGE_REPOSITORY }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}

.github/workflows/build-test-deploy.yml

Lines changed: 92 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -108,42 +108,36 @@ jobs:
108108
echo "MAJOR_TAG=${MAJOR}" >> $GITHUB_ENV
109109
echo "MINOR_TAG=${MAJOR}.${MINOR}" >> $GITHUB_ENV
110110
echo "PATCH_TAG=${MAJOR}.${MINOR}.${PATCH}" >> $GITHUB_ENV
111-
# - name: Build, Tag, Push Major Tag
112-
# run: |
113-
# docker buildx build \
114-
# --platform linux/amd64 \
115-
# --build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
116-
# --tag ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}-amd64 \
117-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-major-amd64 \
118-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-major-amd64 \
119-
# --push \
120-
# --provenance=false \
121-
# --sbom=false \
122-
# .
123-
# - name: Build, Tag, Push Minor Tag
124-
# run: |
125-
# docker buildx build \
126-
# --platform linux/amd64 \
127-
# --build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
128-
# --tag ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}-amd64 \
129-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-minor-amd64 \
130-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-minor-amd64 \
131-
# --push \
132-
# --provenance=false \
133-
# --sbom=false \
134-
# .
135-
# - name: Build, Tag, Push Patch Tag
136-
# run: |
137-
# docker buildx build \
138-
# --platform linux/amd64 \
139-
# --build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
140-
# --tag ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}-amd64 \
141-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-patch-amd64 \
142-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-patch-amd64 \
143-
# --push \
144-
# --provenance=false \
145-
# --sbom=false \
146-
# .
111+
- name: Build, Tag, Push Major Tag
112+
run: |
113+
docker buildx build \
114+
--platform linux/amd64 \
115+
--build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
116+
--tag ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}-amd64 \
117+
--push \
118+
--provenance=false \
119+
--sbom=false \
120+
.
121+
- name: Build, Tag, Push Minor Tag
122+
run: |
123+
docker buildx build \
124+
--platform linux/amd64 \
125+
--build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
126+
--tag ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}-amd64 \
127+
--push \
128+
--provenance=false \
129+
--sbom=false \
130+
.
131+
- name: Build, Tag, Push Patch Tag
132+
run: |
133+
docker buildx build \
134+
--platform linux/amd64 \
135+
--build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
136+
--tag ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}-amd64 \
137+
--push \
138+
--provenance=false \
139+
--sbom=false \
140+
.
147141
148142
build-arm64:
149143
name: Build arm64
@@ -189,42 +183,36 @@ jobs:
189183
echo "MAJOR_TAG=${MAJOR}" >> $GITHUB_ENV
190184
echo "MINOR_TAG=${MAJOR}.${MINOR}" >> $GITHUB_ENV
191185
echo "PATCH_TAG=${MAJOR}.${MINOR}.${PATCH}" >> $GITHUB_ENV
192-
# - name: Build, Tag, Push Major Tag
193-
# run: |
194-
# docker buildx build \
195-
# --platform linux/arm64 \
196-
# --build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
197-
# --tag ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}-arm64 \
198-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-major-arm64 \
199-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-major-arm64 \
200-
# --push \
201-
# --provenance=false \
202-
# --sbom=false \
203-
# .
204-
# - name: Build, Tag, Push Minor Tag
205-
# run: |
206-
# docker buildx build \
207-
# --platform linux/arm64 \
208-
# --build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
209-
# --tag ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}-arm64 \
210-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-minor-arm64 \
211-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-minor-arm64 \
212-
# --push \
213-
# --provenance=false \
214-
# --sbom=false \
215-
# .
216-
# - name: Build, Tag, Push Patch Tag
217-
# run: |
218-
# docker buildx build \
219-
# --platform linux/arm64 \
220-
# --build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
221-
# --tag ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}-arm64 \
222-
# --cache-from type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-patch-arm64 \
223-
# --cache-to type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-patch-arm64 \
224-
# --push \
225-
# --provenance=false \
226-
# --sbom=false \
227-
# .
186+
- name: Build, Tag, Push Major Tag
187+
run: |
188+
docker buildx build \
189+
--platform linux/arm64 \
190+
--build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
191+
--tag ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}-arm64 \
192+
--push \
193+
--provenance=false \
194+
--sbom=false \
195+
.
196+
- name: Build, Tag, Push Minor Tag
197+
run: |
198+
docker buildx build \
199+
--platform linux/arm64 \
200+
--build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
201+
--tag ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}-arm64 \
202+
--push \
203+
--provenance=false \
204+
--sbom=false \
205+
.
206+
- name: Build, Tag, Push Patch Tag
207+
run: |
208+
docker buildx build \
209+
--platform linux/arm64 \
210+
--build-arg REVISION_HASH=${{ env.GITHUB_SHA }} \
211+
--tag ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}-arm64 \
212+
--push \
213+
--provenance=false \
214+
--sbom=false \
215+
.
228216
229217
create-manifest:
230218
name: Create Manifest
@@ -256,24 +244,24 @@ jobs:
256244
echo "MAJOR_TAG=${MAJOR}" >> $GITHUB_ENV
257245
echo "MINOR_TAG=${MAJOR}.${MINOR}" >> $GITHUB_ENV
258246
echo "PATCH_TAG=${MAJOR}.${MINOR}.${PATCH}" >> $GITHUB_ENV
259-
# - name: Create and Push Manifest for Major Tag
260-
# run: |
261-
# docker manifest create ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }} \
262-
# --amend ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}-amd64 \
263-
# --amend ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}-arm64
264-
# docker manifest push ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}
265-
# - name: Create and Push Manifest for Minor Tag
266-
# run: |
267-
# docker manifest create ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }} \
268-
# --amend ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}-amd64 \
269-
# --amend ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}-arm64
270-
# docker manifest push ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}
271-
# - name: Create and Push Manifest for Patch Tag
272-
# run: |
273-
# docker manifest create ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }} \
274-
# --amend ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}-amd64 \
275-
# --amend ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}-arm64
276-
# docker manifest push ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}
247+
- name: Create and Push Manifest for Major Tag
248+
run: |
249+
docker manifest create ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }} \
250+
--amend ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}-amd64 \
251+
--amend ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}-arm64
252+
docker manifest push ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}
253+
- name: Create and Push Manifest for Minor Tag
254+
run: |
255+
docker manifest create ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }} \
256+
--amend ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}-amd64 \
257+
--amend ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}-arm64
258+
docker manifest push ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}
259+
- name: Create and Push Manifest for Patch Tag
260+
run: |
261+
docker manifest create ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }} \
262+
--amend ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}-amd64 \
263+
--amend ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}-arm64
264+
docker manifest push ${{ env.IMAGE_REPOSITORY }}:${{ env.PATCH_TAG }}
277265
278266
deploy-assets:
279267
name: Deploy Assets
@@ -304,17 +292,17 @@ jobs:
304292
echo "MAJOR_TAG=${MAJOR}" >> $GITHUB_ENV
305293
echo "MINOR_TAG=${MAJOR}.${MINOR}" >> $GITHUB_ENV
306294
echo "PATCH_TAG=${MAJOR}.${MINOR}.${PATCH}" >> $GITHUB_ENV
307-
# - name: Deploy Static Assets to GCS Bucket
308-
# run: |
309-
# CONTAINER_ID=$(docker create "coralproject/talk:${PATCH_TAG}")
310-
# docker cp "${CONTAINER_ID}:/usr/src/app/client/dist/static" static/
311-
# docker rm "${CONTAINER_ID}"
312-
# find ./static -type f -name "*.gz" -print -delete
313-
# gsutil -m -h "Cache-Control: public, max-age=86400, immutable" cp -r -z "js,css,map,txt,json" ./static/** "gs://${GOOGLE_CLOUD_BUCKET}/${PATCH_TAG}/"
314-
# - name: Upload to Sentry
315-
# run: |
316-
# CONTAINER_ID=$(docker create "coralproject/talk:${PATCH_TAG}")
317-
# docker cp "${CONTAINER_ID}:/usr/src/app/client/dist" dist/
318-
# docker rm "${CONTAINER_ID}"
319-
# npx @sentry/cli -V
320-
# npx @sentry/cli releases files "coral@${PATCH_TAG}" upload-sourcemaps ./dist --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }}
295+
- name: Deploy Static Assets to GCS Bucket
296+
run: |
297+
CONTAINER_ID=$(docker create "coralproject/talk:${PATCH_TAG}")
298+
docker cp "${CONTAINER_ID}:/usr/src/app/client/dist/static" static/
299+
docker rm "${CONTAINER_ID}"
300+
find ./static -type f -name "*.gz" -print -delete
301+
gsutil -m -h "Cache-Control: public, max-age=86400, immutable" cp -r -z "js,css,map,txt,json" ./static/** "gs://${GOOGLE_CLOUD_BUCKET}/${PATCH_TAG}/"
302+
- name: Upload to Sentry
303+
run: |
304+
CONTAINER_ID=$(docker create "coralproject/talk:${PATCH_TAG}")
305+
docker cp "${CONTAINER_ID}:/usr/src/app/client/dist" dist/
306+
docker rm "${CONTAINER_ID}"
307+
npx @sentry/cli -V
308+
npx @sentry/cli releases files "coral@${PATCH_TAG}" upload-sourcemaps ./dist --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }}

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coralproject/talk",
3-
"version": "9.9.6",
3+
"version": "9.9.7",
44
"author": "The Coral Project",
55
"homepage": "https://coralproject.net/",
66
"sideEffects": [

common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "common",
3-
"version": "9.9.6",
3+
"version": "9.9.7",
44
"description": "",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)