Skip to content

Commit 034417b

Browse files
authored
Merge pull request #70 from redis/unstable-env-file
Update unstable
2 parents da37532 + 3ee9a1d commit 034417b

File tree

10 files changed

+89
-38
lines changed

10 files changed

+89
-38
lines changed

.github/.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
BUILD_ARCHS=["i386", "amd64", "arm64", "armhf"]
2+
BUILD_DISTS=["noble", "jammy", "bookworm", "trixie"]
3+
BUILD_EXCLUDE=[ {"dist":"noble", "arch":"i386"}, {"dist":"jammy", "arch":"i386"} ]
4+
SMOKE_TEST_IMAGES=["ubuntu:jammy", "ubuntu:noble", "debian:bookworm", "debian:trixie"]

.github/actions/build-binary-package/action.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,10 @@ inputs:
99
arch:
1010
description: "Architecture to build for"
1111
required: true
12-
checkout_ref:
13-
description: "Ref to checkout"
14-
required: false
15-
default: ''
1612

1713
runs:
1814
using: "composite"
1915
steps:
20-
- uses: actions/checkout@v4
21-
with:
22-
ref: ${{ inputs.checkout_ref || '' }}
2316
- name: Determine build architecture
2417
shell: bash
2518
run: |

.github/actions/build-source-package/action.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,10 @@ inputs:
77
release_tag:
88
description: "Release tag to build for (value 'unstable' is supported)"
99
required: false
10-
checkout_ref:
11-
description: "Ref to checkout"
12-
required: false
13-
default: ''
1410

1511
runs:
1612
using: "composite"
1713
steps:
18-
- uses: actions/checkout@v4
19-
with:
20-
ref: ${{ inputs.checkout_ref || '' }}
2114
- name: Install dependencies
2215
shell: bash
2316
run: |
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Parse env file"
2+
description: "Parses .env environment file and extracts all available fields as outputs"
3+
4+
inputs:
5+
env_file_path:
6+
description: ".env file path"
7+
default: '.github/.env'
8+
required: false
9+
10+
outputs:
11+
BUILD_ARCHS:
12+
description: "The extracted BUILD_DISTS from .env file"
13+
value: ${{ steps.parse.outputs.BUILD_ARCHS }}
14+
BUILD_DISTS:
15+
description: "The extracted BUILD_DISTS from .env file"
16+
value: ${{ steps.parse.outputs.BUILD_DISTS }}
17+
BUILD_EXCLUDE:
18+
description: "The extracted BUILD_EXCLUDE from .env file"
19+
value: ${{ steps.parse.outputs.BUILD_EXCLUDE }}
20+
SMOKE_TEST_IMAGES:
21+
description: "The extracted SMOKE_TEST_IMAGES from .env file"
22+
value: ${{ steps.parse.outputs.SMOKE_TEST_IMAGES }}
23+
24+
runs:
25+
using: "composite"
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v4
29+
30+
- name: Parse release handle
31+
id: parse
32+
shell: bash
33+
run: |
34+
cat "${{ inputs.env_file_path }}" | while IFS= read -r line || [[ -n "$line" ]]; do
35+
[[ -z "$line" || "$line" =~ ^# ]] && continue
36+
echo "$line" >> "$GITHUB_OUTPUT"
37+
done

.github/actions/run-smoke-tests/action.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,10 @@ inputs:
99
arch:
1010
description: "Architecture to run smoke tests for"
1111
required: true
12-
checkout_ref:
13-
description: "Ref to checkout"
14-
required: false
15-
default: ''
1612

1713
runs:
1814
using: "composite"
1915
steps:
20-
- uses: actions/checkout@v4
21-
with:
22-
ref: ${{ inputs.checkout_ref || '' }}
2316
- name: Extract distribution from image
2417
id: extract_dist
2518
shell: bash

.github/actions/upload-packages/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ runs:
7272
# For internal release we have an IAM role that we need to assume
7373
- name: Configure aws credentials for internal release
7474
if: ${{ inputs.release_type == 'internal' }}
75-
uses: aws-actions/configure-aws-credentials@v1.7.0
75+
uses: aws-actions/configure-aws-credentials@v4.3.1
7676
with:
7777
role-to-assume: ${{ inputs.APT_S3_IAM_ARN }}
7878
aws-region: us-east-1

.github/workflows/apt.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,29 @@ run-name: >-
3131
}}
3232
3333
jobs:
34+
populate-env-vars:
35+
runs-on: ["ubuntu-latest"]
36+
steps:
37+
- name: Checkout code
38+
uses: actions/checkout@v4
39+
40+
- name: Parse vars
41+
id: parse
42+
uses: ./.github/actions/parse-env-file
43+
outputs:
44+
BUILD_ARCHS: ${{ steps.parse.outputs.BUILD_ARCHS }}
45+
BUILD_DISTS: ${{ steps.parse.outputs.BUILD_DISTS }}
46+
BUILD_EXCLUDE: ${{ steps.parse.outputs.BUILD_EXCLUDE }}
47+
SMOKE_TEST_IMAGES: ${{ steps.parse.outputs.SMOKE_TEST_IMAGES }}
48+
3449
build-n-test:
3550
uses: ./.github/workflows/build-n-test-all-distros.yml
51+
needs: populate-env-vars
3652
with:
37-
BUILD_DISTS: ${{ vars.BUILD_DISTS }}
38-
BUILD_ARCHS: ${{ vars.BUILD_ARCHS }}
39-
BUILD_EXCLUDE: ${{ vars.BUILD_EXCLUDE }}
40-
SMOKE_TEST_IMAGES: ${{ vars.SMOKE_TEST_IMAGES }}
53+
BUILD_DISTS: ${{ needs.populate-env-vars.outputs.BUILD_DISTS }}
54+
BUILD_ARCHS: ${{ needs.populate-env-vars.outputs.BUILD_ARCHS }}
55+
BUILD_EXCLUDE: ${{ needs.populate-env-vars.outputs.BUILD_EXCLUDE }}
56+
SMOKE_TEST_IMAGES: ${{ needs.populate-env-vars.outputs.SMOKE_TEST_IMAGES }}
4157
# Determine whether we should use special "unstable" release_tag. Assume
4258
# that for unstable branch and for any external call, dispatch or schedule
4359
# we are building unstable release. In other cases it's a regular PR/push

.github/workflows/build-n-test-all-distros.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
with:
5050
dist: ${{ matrix.dist }}
5151
release_tag: ${{ inputs.release_tag }}
52-
checkout_ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}
5352

5453
build-binary-package:
5554
runs-on: ${{ contains(matrix.arch, 'arm') && 'ubuntu24-arm64-2-8' || 'ubuntu-24.04' }}
@@ -78,7 +77,6 @@ jobs:
7877
dist: ${{ matrix.dist }}
7978
arch: ${{ matrix.arch }}
8079
run_id: ${{ github.run_id }}
81-
checkout_ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}
8280

8381
smoke-test-archs:
8482
runs-on: ubuntu-latest
@@ -115,4 +113,3 @@ jobs:
115113
image: ${{ matrix.image }}
116114
arch: ${{ matrix.arch }}
117115
run_id: ${{ github.run_id }}
118-
checkout_ref: ${{ inputs.release_tag == 'unstable' && 'unstable' || '' }}

.github/workflows/release_build_and_test.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,31 @@ jobs:
4545
release_version_branch: ${{ steps.ensure-branch.outputs.release_version_branch }}
4646
release_type: ${{ github.event.inputs.release_type }}
4747

48+
populate-env-vars:
49+
runs-on: ["ubuntu-latest"]
50+
steps:
51+
- name: Checkout code
52+
uses: actions/checkout@v4
53+
54+
- name: Parse vars
55+
id: parse
56+
uses: ./.github/actions/parse-env-file
57+
outputs:
58+
BUILD_ARCHS: ${{ steps.parse.outputs.BUILD_ARCHS }}
59+
BUILD_DISTS: ${{ steps.parse.outputs.BUILD_DISTS }}
60+
BUILD_EXCLUDE: ${{ steps.parse.outputs.BUILD_EXCLUDE }}
61+
SMOKE_TEST_IMAGES: ${{ steps.parse.outputs.SMOKE_TEST_IMAGES }}
62+
4863
build-n-test:
49-
needs: prepare-release
64+
needs:
65+
- prepare-release
66+
- populate-env-vars
5067
uses: ./.github/workflows/build-n-test-all-distros.yml
5168
with:
52-
BUILD_DISTS: ${{ vars.BUILD_DISTS }}
53-
BUILD_ARCHS: ${{ vars.BUILD_ARCHS }}
54-
BUILD_EXCLUDE: ${{ vars.BUILD_EXCLUDE }}
55-
SMOKE_TEST_IMAGES: ${{ vars.SMOKE_TEST_IMAGES }}
69+
BUILD_DISTS: ${{ needs.populate-env-vars.outputs.BUILD_DISTS }}
70+
BUILD_ARCHS: ${{ needs.populate-env-vars.outputs.BUILD_ARCHS }}
71+
BUILD_EXCLUDE: ${{ needs.populate-env-vars.outputs.BUILD_EXCLUDE }}
72+
SMOKE_TEST_IMAGES: ${{ needs.populate-env-vars.outputs.SMOKE_TEST_IMAGES }}
5673
release_tag: ${{ inputs.release_tag }}
5774

5875
create-release-handle:
@@ -95,7 +112,6 @@ jobs:
95112
fi
96113
echo "env_name=$env_name" >> $GITHUB_OUTPUT
97114
- name: Send Failure Slack notification
98-
if: failure()
99115
uses: ./.github/actions/slack-notification
100116
with:
101117
slack_func: slack_format_failure_message

.github/workflows/release_publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,19 @@ jobs:
6464
with:
6565
release_handle: ${{ github.event.inputs.release_handle }}
6666

67-
- name: Upload staging packages
67+
- name: Upload packages
6868
id: upload
6969
uses: ./.github/actions/upload-packages
7070
with:
7171
run_id: ${{ steps.parse-handle.outputs.run_id }}
7272
release_type: ${{ github.event.inputs.release_type }}
7373
gh_token: ${{ secrets.GITHUB_TOKEN }}
7474
APT_SIGNING_KEY: ${{ secrets.APT_SIGNING_KEY }}
75-
APT_S3_BUCKET: ${{ secrets.APT_S3_BUCKET_STAGING }}
7675
APT_S3_REGION: ${{ secrets.APT_S3_REGION }}
77-
APT_S3_IAM_ARN: ${{ secrets.APT_S3_IAM_ARN_STAGING }}
76+
APT_S3_BUCKET: ${{ github.event.inputs.release_type == 'public' && secrets.APT_S3_BUCKET || secrets.APT_S3_BUCKET_STAGING }}
77+
APT_S3_IAM_ARN: ${{ github.event.inputs.release_type == 'internal' && secrets.APT_S3_IAM_ARN_STAGING || '' }}
78+
APT_S3_ACCESS_KEY_ID: ${{ github.event.inputs.release_type == 'public' && secrets.APT_S3_ACCESS_KEY_ID || '' }}
79+
APT_S3_SECRET_ACCESS_KEY: ${{ github.event.inputs.release_type == 'public' && secrets.APT_S3_SECRET_ACCESS_KEY || '' }}
7880

7981
- name: Merge back to release branch
8082
id: merge-back

0 commit comments

Comments
 (0)