Skip to content

Merge pull request #17 from mesosphere/julferts/add-rhel8.10-9.4 #18

Merge pull request #17 from mesosphere/julferts/add-rhel8.10-9.4

Merge pull request #17 from mesosphere/julferts/add-rhel8.10-9.4 #18

Workflow file for this run

---
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
release:
name: Create D2iQ Templates
runs-on:
- self-hosted-nutanix-medium
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "rocky", "centos", "rhel", "oraclelinux", "flatcar"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Setup requirements
run: |
sudo apt-get update && sudo apt-get -y install xorriso
curl -L -o - "https://github.com/vmware/govmomi/releases/latest/download/govc_$(uname -s)_$(uname -m).tar.gz" | sudo tar -C /usr/local/bin -xvzf - govc
- name: Run release for ${{ matrix.os }}
run: make ${{ matrix.os }}-release
env:
VSPHERE_USERNAME: ${{ secrets.VSPHERE_SRE_USERNAME }}
VSPHERE_PASSWORD: ${{ secrets.VSPHERE_SRE_PASSWORD }}
VSPHERE_SERVER: ${{ secrets.VSPHERE_SERVER }}
GOVC_URL: ${{ secrets.VSPHERE_SRE_USERNAME }}:${{ secrets.VSPHERE_SRE_PASSWORD }}@${{ secrets.VSPHERE_SERVER }}
PKR_VAR_vsphere_cluster: ${{ secrets.VSPHERE_CLUSTER }}
PKR_VAR_vsphere_datacenter: ${{ secrets.VSPHERE_DATACENTER }}
PKR_VAR_vsphere_datastore: ${{ secrets.VSPHERE_DATASTORE }}
PKR_VAR_vsphere_network: ${{ secrets.VSPHERE_NETWORK }}
PKR_VAR_vsphere_resource_pool: ${{ secrets.VSPHERE_RESOURCE_POOL }}
RHN_SUBSCRIPTION_ORG: ${{ secrets.RHN_SUBSCRIPTION_ORG }}
RHN_SUBSCRIPTION_KEY: ${{ secrets.RHN_SUBSCRIPTION_KEY }}
create_release:
permissions:
contents: write
name: Create Github release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
export:
name: Generate OVF for Export
needs: [release]
runs-on:
- self-hosted
- small
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "rocky", "centos", "flatcar"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Setup requirements
run: |
sudo apt-get update && sudo apt-get -y install xorriso
- name: Export ovf for ${{ matrix.os }}
run: make ${{ matrix.os }}-ovf
env:
VSPHERE_USERNAME: ${{ secrets.VSPHERE_SRE_USERNAME }}
VSPHERE_PASSWORD: ${{ secrets.VSPHERE_SRE_PASSWORD }}
VSPHERE_SERVER: ${{ secrets.VSPHERE_SERVER }}
GOVC_URL: ${{ secrets.VSPHERE_SRE_USERNAME }}:${{ secrets.VSPHERE_SRE_PASSWORD }}@${{ secrets.VSPHERE_SERVER }}
PKR_VAR_vsphere_cluster: ${{ secrets.VSPHERE_CLUSTER }}
PKR_VAR_vsphere_datacenter: ${{ secrets.VSPHERE_DATACENTER }}
PKR_VAR_vsphere_datastore: ${{ secrets.VSPHERE_DATASTORE }}
PKR_VAR_vsphere_network: ${{ secrets.VSPHERE_NETWORK }}
PKR_VAR_vsphere_resource_pool: ${{ secrets.VSPHERE_RESOURCE_POOL }}
RHN_SUBSCRIPTION_ORG: ${{ secrets.RHN_SUBSCRIPTION_ORG }}
RHN_SUBSCRIPTION_KEY: ${{ secrets.RHN_SUBSCRIPTION_KEY }}
- name: Export ovf for ${{ matrix.os }}
run: make ${{ matrix.os }}-ovf
- uses: actions/upload-artifact@v3
with:
name: releaseovf
path: |
manifests/ovf/*.ovf.tar.gz
artifactinventory:
name: Create artifact inventory
runs-on: ubuntu-latest
needs: [export]
outputs:
listovf: ${{ steps.list.outputs.listovf }}
steps:
- uses: actions/download-artifact@v3
id: download
with:
name: releaseovf
path: releaseovf/
- name: json from downloaded artifacts
id: list
run: |
DATA=$(ls releaseovf/*.ovf.tar.gz | jq -R -s -c 'split("\n")[:-1]')
echo "listovf=$DATA" >> "$GITHUB_OUTPUT"
releaseassets:
name: Upload release assets
permissions:
contents: write
runs-on: ubuntu-latest
needs: [create_release, artifactinventory]
strategy:
fail-fast: false
matrix:
ovf: ${{ fromJSON(needs.artifactinventory.outputs.listovf) }}
steps:
- uses: actions/download-artifact@v3
id: download
with:
name: releaseovf
path: releaseovf/
- name: Upload ovf
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./${{ matrix.ovf }}
asset_name: ${{ matrix.ovf }}
asset_content_type: application/zip