Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v7] Add new release validation #3301

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/release-update-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ jobs:

test-deb:
name: Test Debian Repository
runs-on: ubuntu-20.04
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-latest]
runs-on: ${{ matrix.os }}
needs:
- setup
- update-deb
Expand Down
146 changes: 146 additions & 0 deletions .github/workflows/test-latest-releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: "Check: Check release on package managers"
run-name: "Check: Check release on package managers [${{ github.ref_name }}]"

on:
workflow_dispatch:
inputs:
major-version:
description: Major version to retrieve
required: true
type: choice
options:
- '8'
- '7'
version:
description: Version of CLI to check if it is present
type: string
required: true
claw-url:
description: Location of CLAW
type: string
required: true
default: https://packages.cloudfoundry.org

defaults:
run:
shell: bash

jobs:
test-homebrew:
name: Test Homebrew Repository
runs-on: macos-latest
env:
CLAW_URL: ${{ inputs.claw-url }}
VERSION_BUILD: ${{ inputs.version }}
VERSION_MAJOR: ${{ inputs.major-version }}
steps:

- name: Install CF CLI via Homebrew
run: |
set -evx

brew install cloudfoundry/tap/cf-cli@${VERSION_MAJOR}
installed_cf_version=$(cf${VERSION_MAJOR} version)

cf_location=$(which cf)

echo $cf_location
echo $installed_cf_version
echo ${VERSION_BUILD}

codesign --verify $cf_location || echo ---

cf -v | grep "${VERSION_BUILD}"

test-deb:
name: Test Debian Repository
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
CLAW_URL: ${{ inputs.claw-url }}
VERSION_BUILD: ${{ inputs.version }}
VERSION_MAJOR: ${{ inputs.major-version }}
steps:

- name: Install CF CLI via apt
run: |
set -o pipefail -e

sudo apt update
sudo apt install -y wget gnupg

wget -q -O - ${CLAW_URL}/debian/cli.cloudfoundry.org.key | sudo apt-key add -
echo "deb ${CLAW_URL}/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list

sudo apt update
sudo apt install -y cf${VERSION_MAJOR}-cli

which cf

set -x

cf -v
cf${VERSION_MAJOR} -v

cf -v | grep "${VERSION_BUILD}"


test-rpm-repo:
name: Test RPM Repository
runs-on: ubuntu-latest
container:
image: fedora
env:
CLAW_URL: ${{ inputs.claw-url }}
VERSION_BUILD: ${{ inputs.version }}
VERSION_MAJOR: ${{ inputs.major-version }}
steps:

- name: Configure Custom CF Repository
run: |
curl -sL -o /etc/yum.repos.d/cloudfoundry-cli.repo \
${CLAW_URL}/fedora/cloudfoundry-cli.repo

- name: Install cf cli package
run: dnf install -y cf${VERSION_MAJOR}-cli

- name: Print CF CLI Versions
run: |
cf -v
cf${VERSION_MAJOR} -v

- name: Test Version Match
run: cf -v | grep -q "${VERSION_BUILD}"

test-windows:
name: Test Windows Chocolatey Package
runs-on: windows-2019
defaults:
run:
shell: pwsh
env:
VERSION_BUILD: ${{ inputs.version }}
VERSION_MAJOR: ${{ inputs.major-version }}
steps:

- name: Install cf cli package
run: choco install cloudfoundry-cli --version $env:VERSION_BUILD

- name: Print Chocolatey CF CLI Versions
run: |
cd 'C:/ProgramData/chocolatey/lib/cloudfoundry-cli/tools'
./cf -v
Invoke-Expression "./cf$env:VERSION_MAJOR -v"

- name: Test Chocolatey Version Match
run: |
cd 'C:/ProgramData/chocolatey/lib/cloudfoundry-cli/tools'
$found = (./cf -v | Select-String "$env:VERSION_BUILD")
if ($null -eq $found) {
Write-Error "CF CLI version $env:VERSION_BUILD was not found" -ErrorAction Stop
}


# vim: set sw=2 ts=2 sts=2 et tw=78 foldlevel=2 fdm=indent nospell:
Loading