Skip to content

Commit d15a539

Browse files
authored
Merge pull request #68296 from dwoz/merge/master/3007.x-25-08-28
Merge forward 3007.x into master
2 parents 3ce11a7 + fc32394 commit d15a539

233 files changed

Lines changed: 9058 additions & 3623 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-packages.yml

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -343,24 +343,39 @@ jobs:
343343
name: salt-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz
344344
path: artifacts/
345345

346-
- name: Prepare Package Signing
346+
- name: Setup Keychain
347347
if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }}
348+
env:
349+
APP_CERT_BASE64: "${{ secrets.MAC_SIGN_DEV_APP_CERT_B64 }}"
350+
INS_CERT_BASE64: "${{ secrets.MAC_SIGN_DEV_INSTALL_CERT_B64 }}"
351+
SIGNING_PASSWORD: "${{ secrets.MAC_SIGN_DEV_PASSWORD }}"
352+
KEYCHAIN_NAME: "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}"
348353
run: |
349-
echo ${{ secrets.MAC_SIGN_DEV_APP_CERT_B64 }} | base64 --decode > app-cert.p12
350-
echo ${{ secrets.MAC_SIGN_DEV_INSTALL_CERT_B64 }} | base64 --decode > install-cert.p12
351-
# Create SaltSigning keychain. This will contain the certificates for signing
352-
security create-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}"
353-
# Append SaltSigning keychain to the search list
354-
security list-keychains -d user -s "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" "$(security list-keychains -d user | sed s/\"//g)"
355-
# Unlock the keychain so we can import certs
356-
security unlock-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}"
357-
# Developer Application Certificate
358-
security import "app-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A
359-
rm app-cert.p12
360-
# Developer Installer Certificate
361-
security import "install-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A
362-
rm install-cert.p12
363-
security set-key-partition-list -S apple-tool:,apple: -k "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" &> /dev/null
354+
# https://docs.github.com/en/actions/how-tos/deploy/deploy-to-third-party-platforms/sign-xcode-applications#add-a-step-to-your-workflow
355+
356+
# Create variables
357+
APP_CERT_PATH="$RUNNER_TEMP/app_cert.p12"
358+
INS_CERT_PATH="$RUNNER_TEMP/installer_cert.p12"
359+
KEYCHAIN_PATH="$RUNNER_TEMP/$KEYCHAIN_NAME"
360+
361+
# Decode certificates from secrets
362+
echo -n "$APP_CERT_BASE64" | base64 --decode -o "$APP_CERT_PATH"
363+
echo -n "$INS_CERT_BASE64" | base64 --decode -o "$INS_CERT_PATH"
364+
365+
# Create temporary keychain
366+
security create-keychain -p "$SIGNING_PASSWORD" "$KEYCHAIN_PATH"
367+
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
368+
security unlock-keychain -p "$SIGNING_PASSWORD" "$KEYCHAIN_PATH"
369+
370+
# Import certificates to keychain
371+
security import "$APP_CERT_PATH" -P "$SIGNING_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
372+
security import "$INS_CERT_PATH" -P "$SIGNING_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
373+
security set-key-partition-list -S apple-tool,apple: -k "$SIGNING_PASSWORD" "$KEYCHAIN_PATH"
374+
security list-keychain -d user -s "$KEYCHAIN_PATH"
375+
376+
# Cleanup certificate files
377+
rm "$APP_CERT_PATH"
378+
rm "$INS_CERT_PATH"
364379
365380
- name: Build MacOS Package
366381
env:
@@ -382,6 +397,19 @@ jobs:
382397
format('--salt-version {0}', inputs.salt-version)
383398
}}
384399
400+
- name: Clean Keychain
401+
if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }}
402+
env:
403+
KEYCHAIN_NAME: "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}"
404+
run: |
405+
# https://docs.github.com/en/actions/how-tos/deploy/deploy-to-third-party-platforms/sign-xcode-applications#add-a-step-to-your-workflow
406+
407+
# Create Variables
408+
KEYCHAIN_PATH="$RUNNER_TEMP/$KEYCHAIN_NAME"
409+
410+
# Cleanup
411+
security delete-keychain "$KEYCHAIN_PATH"
412+
385413
- name: Set Artifact Name
386414
id: set-artifact-name
387415
run: |

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ jobs:
437437
with:
438438
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
439439
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
440-
relenv-version: "0.20.3"
440+
relenv-version: "0.20.6"
441441
python-version: "3.11.13"
442442
ci-python-version: "3.11"
443443
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -454,7 +454,7 @@ jobs:
454454
with:
455455
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
456456
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
457-
relenv-version: "0.20.3"
457+
relenv-version: "0.20.6"
458458
python-version: "3.11.13"
459459
ci-python-version: "3.11"
460460
source: "onedir"
@@ -471,7 +471,7 @@ jobs:
471471
with:
472472
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
473473
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
474-
relenv-version: "0.20.3"
474+
relenv-version: "0.20.6"
475475
python-version: "3.11.13"
476476
ci-python-version: "3.11"
477477
source: "src"

.github/workflows/nightly.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ jobs:
432432
with:
433433
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
434434
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
435-
relenv-version: "0.20.3"
435+
relenv-version: "0.20.6"
436436
python-version: "3.11.13"
437437
ci-python-version: "3.11"
438438
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -449,14 +449,14 @@ jobs:
449449
with:
450450
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
451451
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
452-
relenv-version: "0.20.3"
452+
relenv-version: "0.20.6"
453453
python-version: "3.11.13"
454454
ci-python-version: "3.11"
455455
source: "onedir"
456456
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
457457
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
458458
environment: nightly
459-
sign-macos-packages: false
459+
sign-macos-packages: true
460460
sign-rpm-packages: false
461461
sign-windows-packages: false
462462

@@ -470,14 +470,14 @@ jobs:
470470
with:
471471
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
472472
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
473-
relenv-version: "0.20.3"
473+
relenv-version: "0.20.6"
474474
python-version: "3.11.13"
475475
ci-python-version: "3.11"
476476
source: "src"
477477
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
478478
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
479479
environment: nightly
480-
sign-macos-packages: false
480+
sign-macos-packages: true
481481
sign-rpm-packages: false
482482
sign-windows-packages: false
483483
build-ci-deps:

.github/workflows/scheduled.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ jobs:
480480
with:
481481
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
482482
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
483-
relenv-version: "0.20.3"
483+
relenv-version: "0.20.6"
484484
python-version: "3.11.13"
485485
ci-python-version: "3.11"
486486
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -497,7 +497,7 @@ jobs:
497497
with:
498498
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
499499
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
500-
relenv-version: "0.20.3"
500+
relenv-version: "0.20.6"
501501
python-version: "3.11.13"
502502
ci-python-version: "3.11"
503503
source: "onedir"
@@ -514,7 +514,7 @@ jobs:
514514
with:
515515
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
516516
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
517-
relenv-version: "0.20.3"
517+
relenv-version: "0.20.6"
518518
python-version: "3.11.13"
519519
ci-python-version: "3.11"
520520
source: "src"

.github/workflows/staging.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ on:
3434
type: boolean
3535
default: false
3636
description: Skip running the Salt packages test suite.
37-
skip-salt-pkg-download-test-suite:
38-
type: boolean
39-
default: false
40-
description: Skip running the Salt packages download test suite.
4137

4238
env:
4339
COLUMNS: 190
@@ -241,7 +237,7 @@ jobs:
241237
- name: Define workflow config
242238
id: workflow-config
243239
run: |
244-
tools ci workflow-config${{ inputs.skip-salt-test-suite && ' --skip-tests' || '' }}${{ inputs.skip-salt-pkg-test-suite && ' --skip-pkg-tests' || '' }}${{ inputs.skip-salt-pkg-download-test-suite && ' --skip-pkg-download-tests' || '' }} ${{ steps.setup-salt-version.outputs.salt-version }} ${{ github.event_name }} changed-files.json
240+
tools ci workflow-config${{ inputs.skip-salt-test-suite && ' --skip-tests' || '' }}${{ inputs.skip-salt-pkg-test-suite && ' --skip-pkg-tests' || '' }} ${{ steps.setup-salt-version.outputs.salt-version }} ${{ github.event_name }} changed-files.json
245241
246242
- name: Check Contents of generated testrun-changed-files.txt
247243
if: ${{ fromJSON(steps.workflow-config.outputs.config)['testrun']['type'] != 'full' }}
@@ -468,7 +464,7 @@ jobs:
468464
with:
469465
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
470466
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
471-
relenv-version: "0.20.3"
467+
relenv-version: "0.20.6"
472468
python-version: "3.11.13"
473469
ci-python-version: "3.11"
474470
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
@@ -486,14 +482,14 @@ jobs:
486482
with:
487483
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
488484
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
489-
relenv-version: "0.20.3"
485+
relenv-version: "0.20.6"
490486
python-version: "3.11.13"
491487
ci-python-version: "3.11"
492488
source: "onedir"
493489
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
494490
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
495491
environment: staging
496-
sign-macos-packages: false
492+
sign-macos-packages: true
497493
sign-rpm-packages: ${{ inputs.sign-rpm-packages }}
498494
sign-windows-packages: ${{ inputs.sign-windows-packages }}
499495

@@ -508,14 +504,14 @@ jobs:
508504
with:
509505
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
510506
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
511-
relenv-version: "0.20.3"
507+
relenv-version: "0.20.6"
512508
python-version: "3.11.13"
513509
ci-python-version: "3.11"
514510
source: "src"
515511
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
516512
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
517513
environment: staging
518-
sign-macos-packages: false
514+
sign-macos-packages: true
519515
sign-rpm-packages: ${{ inputs.sign-rpm-packages }}
520516
sign-windows-packages: ${{ inputs.sign-windows-packages }}
521517
build-ci-deps:

.github/workflows/templates/build-packages.yml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
3636
<%- if gh_environment != "ci" %>
3737
environment: <{ gh_environment }>
38-
sign-macos-packages: false
38+
sign-macos-packages: true
3939
sign-rpm-packages: <% if gh_environment == 'nightly' -%> false <%- else -%> ${{ inputs.sign-rpm-packages }} <%- endif %>
4040
sign-windows-packages: <% if gh_environment == 'nightly' -%> false <%- else -%> ${{ inputs.sign-windows-packages }} <%- endif %>
4141

.github/workflows/templates/staging.yml.jinja

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<%- set prepare_workflow_salt_version_input = "${{ inputs.salt-version }}" %>
33
<%- set prepare_workflow_skip_test_suite = "${{ inputs.skip-salt-test-suite && ' --skip-tests' || '' }}" %>
44
<%- set prepare_workflow_skip_pkg_test_suite = "${{ inputs.skip-salt-pkg-test-suite && ' --skip-pkg-tests' || '' }}" %>
5-
<%- set prepare_workflow_skip_pkg_download_test_suite = "${{ inputs.skip-salt-pkg-download-test-suite && ' --skip-pkg-download-tests' || '' }}" %>
65
<%- set gh_environment = "staging" %>
76
<%- set prepare_actual_release = True %>
87
<%- set skip_test_coverage_check = "true" %>
@@ -46,10 +45,6 @@ on:
4645
type: boolean
4746
default: false
4847
description: Skip running the Salt packages test suite.
49-
skip-salt-pkg-download-test-suite:
50-
type: boolean
51-
default: false
52-
description: Skip running the Salt packages download test suite.
5348

5449
<%- endblock on %>
5550

0 commit comments

Comments
 (0)