Skip to content

Commit e1c7b57

Browse files
Merge branch 'main' into e2e/feature/RI-5743-Rename-capabilities
2 parents cbd6c7e + 7e1c0b6 commit e1c7b57

25 files changed

+472
-184
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy Pages
2+
description: 'Download the artifact and deploy to GitHub Pages'
3+
4+
inputs:
5+
group:
6+
description: Group matching the artifacts
7+
required: false
8+
default: '*'
9+
10+
AWS_BUCKET_NAME_TEST:
11+
required: true
12+
AWS_DEFAULT_REGION:
13+
required: true
14+
AWS_DISTRIBUTION_ID:
15+
required: true
16+
AWS_ACCESS_KEY_ID:
17+
required: true
18+
AWS_SECRET_ACCESS_KEY:
19+
required: true
20+
21+
runs:
22+
using: 'composite'
23+
steps:
24+
25+
- name: Get current date
26+
id: date
27+
uses: ./.github/actions/get-current-date
28+
29+
- name: Download artifacts
30+
uses: actions/download-artifact@v4
31+
with:
32+
pattern: ${{ format('{0}*', inputs.group) }}
33+
path: public/${{ github.run_id }}
34+
35+
- name: Deploy 🚀
36+
shell: bash
37+
env:
38+
AWS_BUCKET_NAME_TEST: ${{ inputs.AWS_BUCKET_NAME_TEST }}
39+
AWS_DEFAULT_REGION: ${{ inputs.AWS_DEFAULT_REGION }}
40+
AWS_DISTRIBUTION_ID: ${{ inputs.AWS_DISTRIBUTION_ID }}
41+
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }}
42+
AWS_SECRET_ACCESS_KEY: ${{ inputs.AWS_SECRET_ACCESS_KEY }}
43+
run: |
44+
45+
SUB_PATH=test-reports/${{ steps.date.outputs.date }}
46+
47+
aws s3 cp public/ s3://${AWS_BUCKET_NAME_TEST}/public/${SUB_PATH} --recursive
48+
49+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Remove all artifacts
2+
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Merge artifacts by pattern
7+
id: merge-artifacts
8+
uses: actions/upload-artifact/merge@v4
9+
with:
10+
name: remove-artifacts
11+
pattern: '*'
12+
delete-merged: true
13+
14+
- name: Delete merged artifact
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
github.rest.actions.deleteArtifact({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
artifact_id: ${{ steps.merge-artifacts.outputs.artifact-id }}
22+
});
23+

.github/generate-build-summary.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const fs = require('fs')
22
const path = require('path')
33

4-
const { writeFile } = fs.promises
4+
const { appendFile } = fs.promises
55

66
const { AWS_DEFAULT_REGION, AWS_BUCKET_NAME_TEST, SUB_PATH, GITHUB_STEP_SUMMARY } = process.env;
77

@@ -66,7 +66,7 @@ async function generateBuildSummary() {
6666
const data = markdownLines.join('\n')
6767
const summaryFilePath = GITHUB_STEP_SUMMARY
6868

69-
await writeFile(summaryFilePath, data, { encoding: 'utf8' })
69+
await appendFile(summaryFilePath, data, { encoding: 'utf8' })
7070

7171
console.log('Build summary generated successfully.')
7272

.github/workflows/aws-upload-dev.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,43 +25,35 @@ jobs:
2525
id: date
2626
uses: ./.github/actions/get-current-date
2727

28-
- name: Merge builds by pattern
29-
id: merge-builds
30-
uses: actions/upload-artifact/merge@v4
31-
with:
32-
name: 'all-builds'
33-
pattern: '*-builds'
34-
delete-merged: true
35-
3628
- name: Download builds
3729
uses: actions/download-artifact@v4
3830
with:
39-
name: 'all-builds'
31+
pattern: '*-builds'
4032
path: release
33+
merge-multiple: true
4134

4235
- run: ls -R ./release
4336

44-
- name: Set sub path for dev builds
37+
- name: Upload builds to s3 bucket dev sub folder
4538
if: ${{ !inputs.pre-release }}
4639
run: |
47-
echo "SUB_PATH=dev-builds/${{ steps.date.outputs.date }}/${{ github.run_id }}" >> $GITHUB_ENV
40+
SUB_PATH="dev-builds/${{ steps.date.outputs.date }}/${{ github.run_id }}"
41+
echo "SUB_PATH=${SUB_PATH}" >> $GITHUB_ENV
4842
49-
- name: Set sub path for pre-release builds
43+
aws s3 cp release/ s3://${AWS_BUCKET_NAME_TEST}/public/${SUB_PATH} --recursive
44+
45+
- name: Upload builds to s3 bucket pre-releasea sub folder
5046
if: inputs.pre-release
5147
run: |
5248
APP_VERSION=$(jq -r '.version' redisinsight/package.json)
53-
echo "SUB_PATH=pre-release/${APP_VERSION}" >> $GITHUB_ENV
49+
SUB_PATH="pre-release/${APP_VERSION}"
5450
55-
- name: Upload builds to s3 bucket
56-
run: |
57-
aws s3 cp release/ s3://${AWS_BUCKET_NAME_TEST}/public/${SUB_PATH} --recursive
51+
echo "SUB_PATH=${SUB_PATH}" >> $GITHUB_ENV
52+
53+
aws s3 cp release/ s3://${AWS_BUCKET_NAME_TEST}/public/upgrades --recursive
54+
aws s3 cp release/ s3://${AWS_BUCKET_NAME_TEST}/public/pre-release/${APP_VERSION} --recursive
5855
5956
- name: Generate job summary
6057
run: |
6158
node ./.github/generate-build-summary.js
6259
63-
# Remove artifacts from github actions
64-
remove-artifacts:
65-
name: Remove artifacts
66-
uses: ./.github/workflows/remove-artifacts.yml
67-
needs: 's3'

.github/workflows/aws-upload-prod.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ jobs:
4141
4242
aws s3 cp release/ s3://${AWS_BUCKET_NAME}/private/${applicationVersion} --recursive
4343
44-
# Remove artifacts from github actions
45-
remove-artifacts:
46-
name: Remove artifacts
47-
uses: ./.github/workflows/remove-artifacts.yml
48-
needs: 'release-private'
49-
5044
release-public:
5145
name: Release s3 public
5246
runs-on: ubuntu-latest

.github/workflows/clean-deployments.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44

55
jobs:
66
clean:
7+
name: Clean deployments
78
runs-on: ubuntu-latest
89
steps:
910
- name: 🗑 Delete deployment (staging)

.github/workflows/clean-s3-dev-builds.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ jobs:
1313
deleting:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Deleting builds older than 7 days
16+
- name: Deleting builds and test reports older than 7 days
1717
continue-on-error: true
1818
run: |
1919
DATE=$(date +'%Y-%m-%d')
2020
DATE_EPIRED=$(date -d "$DATE - 7 days" +'%Y-%m-%d')
2121
2222
aws s3 rm s3://${AWS_BUCKET_NAME_TEST}/public/dev-builds/${DATE_EPIRED} --recursive
23+
aws s3 rm s3://${AWS_BUCKET_NAME_TEST}/public/test-reports/${DATE_EPIRED} --recursive
2324

.github/workflows/deploy-pages.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/manual-build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,15 @@ jobs:
9898
needs: [aws-upload]
9999
if: always()
100100

101+
# Remove artifacts from github actions
102+
remove-artifacts:
103+
name: Remove artifacts
104+
needs: [aws-upload]
105+
if: always()
106+
runs-on: ubuntu-latest
107+
108+
steps:
109+
- name: Remove all artifacts
110+
uses: ./.github/actions/remove-artifacts
111+
112+

.github/workflows/pipeline-build-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ jobs:
103103
RI_CLOUD_IDP_GH_ID: ${{ secrets.RI_CLOUD_IDP_GH_ID }}
104104
RI_CLOUD_IDP_GOOGLE_ID: ${{ secrets.RI_CLOUD_IDP_GOOGLE_ID }}
105105
RI_CLOUD_IDP_ISSUER: ${{ secrets.RI_CLOUD_IDP_ISSUER }}
106+
RI_CLOUD_IDP_REVOKE_TOKEN_URL: ${{ secrets.RI_CLOUD_IDP_REVOKE_TOKEN_URL }}
106107
RI_CLOUD_IDP_REDIRECT_URI: ${{ secrets.RI_CLOUD_IDP_REDIRECT_URI }}
107108
RI_CLOUD_IDP_TOKEN_URL: ${{ secrets.RI_CLOUD_IDP_TOKEN_URL }}
108109
RI_SEGMENT_WRITE_KEY: ${{ secrets.RI_SEGMENT_WRITE_KEY }}

0 commit comments

Comments
 (0)