mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
prepare-release
is now part of the main workflow
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
c3c8109c25
commit
62331bfa8f
5 changed files with 288 additions and 114 deletions
76
.github/workflows/ci.yml
vendored
76
.github/workflows/ci.yml
vendored
|
@ -204,12 +204,80 @@ jobs:
|
|||
prepare-release:
|
||||
name: Prepare Release
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- prepare-workflow
|
||||
uses: ./.github/workflows/prepare-release.yml
|
||||
with:
|
||||
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
id: setup-python
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Cache Python Tools Virtualenvs
|
||||
id: nox-dependencies-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.setup-python.outputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
with:
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
||||
- name: Update Debian changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-deb --draft
|
||||
tools changelog update-deb
|
||||
|
||||
- name: Update RPM changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-rpm --draft
|
||||
tools changelog update-rpm
|
||||
|
||||
- name: Update Release Notes
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-release-notes --draft
|
||||
tools changelog update-release-notes
|
||||
|
||||
- name: Generate MAN Pages
|
||||
shell: bash
|
||||
run: |
|
||||
tools docs man
|
||||
|
||||
- name: Update Changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-changelog-md --draft
|
||||
tools changelog update-changelog-md
|
||||
|
||||
- name: Show Changes Diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --color
|
||||
|
||||
- name: Create release changes diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --no-color > salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
|
||||
- name: Upload Source Tarball as an Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
docs:
|
||||
name: Build Docs
|
||||
|
|
76
.github/workflows/nightly.yml
vendored
76
.github/workflows/nightly.yml
vendored
|
@ -202,12 +202,80 @@ jobs:
|
|||
prepare-release:
|
||||
name: Prepare Release
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- prepare-workflow
|
||||
uses: ./.github/workflows/prepare-release.yml
|
||||
with:
|
||||
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
id: setup-python
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Cache Python Tools Virtualenvs
|
||||
id: nox-dependencies-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.setup-python.outputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
with:
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
||||
- name: Update Debian changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-deb --draft
|
||||
tools changelog update-deb
|
||||
|
||||
- name: Update RPM changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-rpm --draft
|
||||
tools changelog update-rpm
|
||||
|
||||
- name: Update Release Notes
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-release-notes --draft
|
||||
tools changelog update-release-notes
|
||||
|
||||
- name: Generate MAN Pages
|
||||
shell: bash
|
||||
run: |
|
||||
tools docs man
|
||||
|
||||
- name: Update Changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-changelog-md --draft
|
||||
tools changelog update-changelog-md
|
||||
|
||||
- name: Show Changes Diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --color
|
||||
|
||||
- name: Create release changes diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --no-color > salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
|
||||
- name: Upload Source Tarball as an Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
docs:
|
||||
name: Build Docs
|
||||
|
|
98
.github/workflows/prepare-release.yml
vendored
98
.github/workflows/prepare-release.yml
vendored
|
@ -1,98 +0,0 @@
|
|||
name: Prepare Release
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to creating the release diff.
|
||||
cache-seed:
|
||||
required: true
|
||||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
python-version:
|
||||
required: false
|
||||
type: string
|
||||
default: "3.10"
|
||||
|
||||
env:
|
||||
COLUMNS: 160
|
||||
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Create Release Diff
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "${{ inputs.python-version }}"
|
||||
|
||||
- name: Cache Python Tools Virtualenvs
|
||||
id: nox-dependencies-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/
|
||||
key: ${{ inputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
with:
|
||||
salt-version: "${{ inputs.salt-version }}"
|
||||
|
||||
- name: Update Debian changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-deb --draft
|
||||
tools changelog update-deb
|
||||
|
||||
- name: Update RPM changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-rpm --draft
|
||||
tools changelog update-rpm
|
||||
|
||||
- name: Update Release Notes
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-release-notes --draft
|
||||
tools changelog update-release-notes
|
||||
|
||||
- name: Generate MAN Pages
|
||||
shell: bash
|
||||
run: |
|
||||
tools docs man
|
||||
|
||||
- name: Update Changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-changelog-md --draft
|
||||
tools changelog update-changelog-md
|
||||
|
||||
- name: Show Changes Diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --color
|
||||
|
||||
- name: Create release changes diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --no-color > salt-${{ inputs.salt-version }}.diff
|
||||
|
||||
- name: Upload Source Tarball as an Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ inputs.salt-version }}.diff
|
||||
path: salt-${{ inputs.salt-version }}.diff
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
76
.github/workflows/scheduled.yml
vendored
76
.github/workflows/scheduled.yml
vendored
|
@ -202,12 +202,80 @@ jobs:
|
|||
prepare-release:
|
||||
name: Prepare Release
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- prepare-workflow
|
||||
uses: ./.github/workflows/prepare-release.yml
|
||||
with:
|
||||
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
id: setup-python
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Cache Python Tools Virtualenvs
|
||||
id: nox-dependencies-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.setup-python.outputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
with:
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
||||
- name: Update Debian changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-deb --draft
|
||||
tools changelog update-deb
|
||||
|
||||
- name: Update RPM changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-rpm --draft
|
||||
tools changelog update-rpm
|
||||
|
||||
- name: Update Release Notes
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-release-notes --draft
|
||||
tools changelog update-release-notes
|
||||
|
||||
- name: Generate MAN Pages
|
||||
shell: bash
|
||||
run: |
|
||||
tools docs man
|
||||
|
||||
- name: Update Changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-changelog-md --draft
|
||||
tools changelog update-changelog-md
|
||||
|
||||
- name: Show Changes Diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --color
|
||||
|
||||
- name: Create release changes diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --no-color > salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
|
||||
- name: Upload Source Tarball as an Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
docs:
|
||||
name: Build Docs
|
||||
|
|
76
.github/workflows/templates/ci.yml.j2
vendored
76
.github/workflows/templates/ci.yml.j2
vendored
|
@ -46,12 +46,80 @@ on:
|
|||
<{ job_name }>:
|
||||
name: Prepare Release
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- prepare-workflow
|
||||
uses: ./.github/workflows/prepare-release.yml
|
||||
with:
|
||||
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
id: setup-python
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Cache Python Tools Virtualenvs
|
||||
id: nox-dependencies-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .tools-venvs/
|
||||
key: ${{ needs.prepare-workflow.outputs.cache-seed }}|${{ github.workflow }}|tools-venvs|${{ steps.setup-python.outputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
|
||||
- name: Setup Salt Version
|
||||
id: setup-salt-version
|
||||
uses: ./.github/actions/setup-salt-version
|
||||
with:
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
|
||||
- name: Update Debian changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-deb --draft
|
||||
tools changelog update-deb
|
||||
|
||||
- name: Update RPM changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-rpm --draft
|
||||
tools changelog update-rpm
|
||||
|
||||
- name: Update Release Notes
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-release-notes --draft
|
||||
tools changelog update-release-notes
|
||||
|
||||
- name: Generate MAN Pages
|
||||
shell: bash
|
||||
run: |
|
||||
tools docs man
|
||||
|
||||
- name: Update Changelog
|
||||
shell: bash
|
||||
run: |
|
||||
tools changelog update-changelog-md --draft
|
||||
tools changelog update-changelog-md
|
||||
|
||||
- name: Show Changes Diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --color
|
||||
|
||||
- name: Create release changes diff
|
||||
shell: bash
|
||||
run: |
|
||||
git diff --no-color > salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
|
||||
- name: Upload Source Tarball as an Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
path: salt-${{ needs.prepare-workflow.outputs.salt-version }}.diff
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
<%- endif %>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue