Skip to content

Commit

Permalink
testbuild using workflow v2
Browse files Browse the repository at this point in the history
  • Loading branch information
bkelly16 committed Nov 15, 2024
1 parent d6ce547 commit fd105df
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 62 deletions.
74 changes: 45 additions & 29 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,51 @@ on:
tags:
- 'v*.*.*'
jobs:
main:
runs-on: deployinatorv1
prebuild:
runs-on: buildinator
outputs:
manifest: ${{ steps.prebuild.outputs.manifest }}
matrix: ${{ steps.prebuild.outputs.matrix }}
uuid: ${{ steps.prebuild.outputs.uuid }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Package Binaries
run: build-packages ${{github.repository}} ${{github.workspace}}
- name: Set Variables
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "PRERELEASE=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.prerelease')" >> $GITHUB_ENV
echo "TITLE=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.title')" >> $GITHUB_ENV
echo "VERSION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.version')" >> $GITHUB_ENV
echo "REVISION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.buildVersion')" >> $GITHUB_ENV
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
uses: actions/checkout@v3

- id: prebuild
name: Prebuild flow
uses: 45drives/actions/prebuild-flow@main
with:
name: ${{env.TITLE}} ${{env.VERSION}}
prerelease: ${{env.PRERELEASE}}
body_path: ${{github.workspace}}/CHANGELOG.md
files: |
${{github.workspace}}/dist/packages/*/*.deb
${{github.workspace}}/dist/packages/*/*.rpm
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Update Repository
if: startsWith(github.ref, 'refs/tags/')
run: update-repositories ${{github.workspace}}
- name: Publish Repository
if: startsWith(github.ref, 'refs/tags/')
run: publish-repo
directory: ${{ github.workspace }}

build:
needs: prebuild
runs-on: buildinator
strategy:
matrix:
build: ${{ fromJSON(needs.prebuild.outputs.matrix).include }}
steps:
- name: Build package
uses: 45drives/actions/build-package@main
with:
manifest: ${{ needs.prebuild.outputs.manifest }}
build: ${{ toJSON(matrix.build) }}
uuid: ${{ needs.prebuild.outputs.uuid }}

edge_deploy:
needs:
- prebuild
- build
runs-on: buildinator
steps:
- name: Run sign playbook
uses: 45drives/actions/ansible-playbook@main
with:
playbook: /root/git/auto-packaging/actions/ansible/sign.yml
directory: ${{ github.workspace }}/packaging
group_vars_directory: ${{ github.workspace }}/packaging/group_var/
inventory: |
[ci]
localhost
become: true
host_key_checking: true
extra_vars: sign_key_name=edge
67 changes: 34 additions & 33 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
{
"__version": "45D-R1",
"schema_version": "45D_AP_V2.0",
"name": "45drives-tools",
"title": "45drives-tools",
"prerelease": false,
"description": "cli tools for 45Drives server products",
"version": "3.0.12",
"buildVersion": "2",
"build_number": "2",
"stable": false,
"author": "Brett Kelly <[email protected]>",
"url": "https://github.com/45Drives/tools",
"category": "utils",
"priority": "optional",
"git_url": "https://github.com/45Drives/ceph-ansible-45d",
"licence": "GPL-3.0+",
"architecture": {
"deb": "amd64",
"el": "x86_64"
},
"description": {
"long": "cli tools for 45Drives server products",
"short": "cli tools for 45Drives server products"
},
"defaults": {
"urgency": "medium"
"change_urgency": "medium"
},
"architecture": {
"rocky": "x86_64",
"debian": "amd64",
"ubuntu": "amd64"
},
"dependencies": {
"deb": [
"ubuntu_common": [
"ipmitool",
"jq",
"smartmontools (>= 7.0 )",
Expand All @@ -33,7 +29,7 @@
"udev",
"lsscsi"
],
"el": [
"rocky_common": [
"ipmitool",
"jq",
"smartmontools > 7.0",
Expand All @@ -44,33 +40,38 @@
"lsscsi"
]
},
"releases": [
"builds": [
{
"image": "ubuntu-focal-builder",
"codeName": "focal",
"type": "deb"
"group": "ubuntu",
"os_name": "ubuntu-focal",
"repo": "community",
"image": "ci.cr.45d.io/ci/simple/ubuntu-focal:1"
},
{
"image": "ubuntu-jammy-builder",
"codeName": "jammy",
"type": "deb"
"group": "ubuntu",
"os_name": "ubuntu-jammy",
"repo": "community",
"image": "ci.cr.45d.io/ci/simple/ubuntu-jammy:1"
},
{
"image": "rocky-el8-builder",
"codeName": "el8",
"type": "el"
"group": "rocky",
"os_name": "rocky-el8",
"repo": "community",
"image": "ci.cr.45d.io/ci/simple/rocky-el8:1"
},
{
"image": "rocky-el9-builder",
"codeName": "el9",
"type": "el"
"group": "rocky",
"os_name": "rocky-el9",
"repo": "community",
"image": "ci.cr.45d.io/ci/simple/rocky-el9:1"
}
],
"sources": [
],
"changelog": {
"urgency": "medium",
"version": "3.0.12",
"buildVersion": "2",
"ignore": [],
"version": "7.0.0",
"build_number": "1",
"date": null,
"packager": "Brett Kelly <[email protected]>",
"changes": []
Expand Down
78 changes: 78 additions & 0 deletions manifest_old.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"__version": "45D-R1",
"name": "45drives-tools",
"title": "45drives-tools",
"prerelease": false,
"version": "3.0.12",
"buildVersion": "2",
"author": "Brett Kelly <[email protected]>",
"url": "https://github.com/45Drives/tools",
"category": "utils",
"priority": "optional",
"licence": "GPL-3.0+",
"architecture": {
"deb": "amd64",
"el": "x86_64"
},
"description": {
"long": "cli tools for 45Drives server products",
"short": "cli tools for 45Drives server products"
},
"defaults": {
"urgency": "medium"
},
"dependencies": {
"deb": [
"ipmitool",
"jq",
"smartmontools (>= 7.0 )",
"dmidecode",
"python3",
"pciutils",
"hdparm",
"udev",
"lsscsi"
],
"el": [
"ipmitool",
"jq",
"smartmontools > 7.0",
"dmidecode",
"python3",
"pciutils",
"hdparm",
"lsscsi"
]
},
"releases": [
{
"image": "ubuntu-focal-builder",
"codeName": "focal",
"type": "deb"
},
{
"image": "ubuntu-jammy-builder",
"codeName": "jammy",
"type": "deb"
},
{
"image": "rocky-el8-builder",
"codeName": "el8",
"type": "el"
},
{
"image": "rocky-el9-builder",
"codeName": "el9",
"type": "el"
}
],
"changelog": {
"urgency": "medium",
"version": "3.0.12",
"buildVersion": "2",
"ignore": [],
"date": null,
"packager": "Brett Kelly <[email protected]>",
"changes": []
}
}

0 comments on commit fd105df

Please sign in to comment.