Skip to content

Commit

Permalink
HPCC-32177 Add Package Manifest File as a Job
Browse files Browse the repository at this point in the history
  • Loading branch information
ebelfarsi committed Jul 2, 2024
1 parent 63341d8 commit 315a312
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 52 deletions.
61 changes: 9 additions & 52 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,7 @@ jobs:
generateReleaseNotes: false
prerelease: ${{ contains(github.ref, '-rc') }}

- name: Release LN
uses: ncipollo/[email protected]
with:
allowUpdates: true
generateReleaseNotes: false
prerelease: ${{ contains(github.ref, '-rc') }}
owner: ${{ secrets.LNB_ACTOR }}
repo: LN
token: ${{ secrets.LNB_TOKEN }}
tag: ${{ steps.vars.outputs.internal_tag }}


build-docker:
name: Build Docker
Expand All @@ -95,48 +86,7 @@ jobs:
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-22.04
name: k8s
container: true
- os: ubuntu-22.04
name: docs
documentation: true
- os: ubuntu-20.04
- os: centos-8
- os: centos-7
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
- os: amazonlinux
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic"
- os: rockylinux-8
- os: ubuntu-22.04
name: LN k8s
ln: true
container: true
- os: ubuntu-22.04
name: LN
ln: true
- os: ubuntu-22.04
name: Enterprise
ee: true
- os: ubuntu-20.04
name: LN
ln: true
- os: centos-8
name: LN
cmake_options_extra: ""
ln: true
- os: centos-7
name: LN
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
ln: true
- os: rockylinux-8
name: LN
cmake_options_extra: ""
ln: true
- os: centos-7-rh-python38
name: LN Python 3.8
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic -DCUSTOM_LABEL=_rh_python38"
ln: true

fail-fast: false

steps:
Expand Down Expand Up @@ -753,3 +703,10 @@ jobs:
with:
name: windows-2022-logs
path: ./ECLIDE/build/**/*.log

run-package-manifest:
needs: [ preamble, build-docker, build-bare-metal, build-bare-metal-eclide ]
uses: ./.github/workflows/package-manifests.yml
with:
tag: ${{ needs.preamble.outputs.community_tag }}
secrets: inherit
47 changes: 47 additions & 0 deletions .github/workflows/package-manifests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Generate Package Manifest

on:
workflow_call:
inputs:
tag:
description: 'The tag to use'
required: true
type: string
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
LNB_TOKEN:
required: true

jobs:
run-package-manifest:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Pull Docker Image
run: docker pull ${{ secrets.DOCKER_USERNAME }}/package-manifest:latest

- name: Run Docker Container
run: docker run --name package-container -e REPO_OWNER=${{ github.repository_owner }} -e REPO_NAME=HPCC-Platform -e TAG=${{ inputs.tag }} -e GIT_TKN=${{ secrets.LNB_TOKEN }} ebelfarsi/package-manifest:latest

- name: Fetch Output from Container
run: docker cp package-container:/app/output.json ${{ github.workspace }}/output.json

- name: Upload output.json to GitHub Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
generateReleaseNotes: false
prerelease: ${{ contains(github.ref, '-rc') }}
artifacts: ${{ github.workspace }}/output.json
token: ${{ secrets.LNB_TOKEN }}

0 comments on commit 315a312

Please sign in to comment.