diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 21ea87e..02e88b0 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/manifest.json b/manifest.json index 1ddb57f..75e1da0 100644 --- a/manifest.json +++ b/manifest.json @@ -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 ", - "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 )", @@ -33,7 +29,7 @@ "udev", "lsscsi" ], - "el": [ + "rocky_common": [ "ipmitool", "jq", "smartmontools > 7.0", @@ -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 ", "changes": [] diff --git a/manifest_old.json b/manifest_old.json new file mode 100644 index 0000000..1ddb57f --- /dev/null +++ b/manifest_old.json @@ -0,0 +1,78 @@ +{ + "__version": "45D-R1", + "name": "45drives-tools", + "title": "45drives-tools", + "prerelease": false, + "version": "3.0.12", + "buildVersion": "2", + "author": "Brett Kelly ", + "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 ", + "changes": [] + } +} \ No newline at end of file