Skip to content

Commit

Permalink
(SIMP-10073) GHA: Add signed RPM to Github release (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
op-ct authored Jun 28, 2021
1 parent b4ed906 commit 4fccde8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/tag_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@
#
# This pipeline uses the following GitHub Action Secrets:
#
# GitHub Secret variable Type Notes
# ------------------------ -------- ----------------------------------------
# PUPPETFORGE_API_TOKEN Required
# GitHub Secret variable Notes
# ------------------------------- ---------------------------------------
# PUPPETFORGE_API_TOKEN
# SIMP_CORE_REF_FOR_BUILDING_RPMS simp-core ref (tag) to use to build
# RPMs with `rake pkg:single`
# SIMP_DEV_GPG_SIGNING_KEY GPG signing key's secret key
# SIMP_DEV_GPG_SIGNING_KEY_ID User ID (name) of signing key
# SIMP_DEV_GPG_SIGNING_KEY_PASSPHRASE Passphrase to use GPG signing key
#
# ------------------------------------------------------------------------------
#
Expand Down Expand Up @@ -55,6 +60,7 @@ jobs:
- name: "Test that Puppet module can build"
run: "bundle exec pdk build --force"


create-github-release:
name: Deploy GitHub Release
needs: [ releng-checks ]
Expand All @@ -67,6 +73,16 @@ jobs:
ref: ${{ github.ref }}
clean: true
fetch-depth: 0

- name: Build Release RPM
uses: simp/github-action-build-and-sign-pkg-single-rpm@v1
id: build-and-sign-rpm
with:
gpg_signing_key: ${{ secrets.SIMP_DEV_GPG_SIGNING_KEY }}
gpg_signing_key_id: ${{ secrets.SIMP_DEV_GPG_SIGNING_KEY_ID }}
gpg_signing_key_passphrase: ${{ secrets.SIMP_DEV_GPG_SIGNING_KEY_PASSPHRASE }}
simp_core_ref_for_building_rpms: ${{ secrets.SIMP_CORE_REF_FOR_BUILDING_RPMS }}

- name: Get tag & annotation info (${{github.ref}})
id: tag-check
run: |
Expand Down Expand Up @@ -99,9 +115,19 @@ jobs:
draft: false
prerelease: false

- name: Upload RPM file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.build-and-sign-rpm.outputs.rpm_file_path }}
asset_name: ${{ steps.build-and-sign-rpm.outputs.rpm_file_basename }}
asset_content_type: application/octet-stream

deploy-to-puppet-forge:
name: Deploy PuppetForge Release
needs: [ releng-checks ]
needs: [ create-github-release ]
if: github.repository_owner == 'simp'
runs-on: ubuntu-18.04
env:
Expand Down
5 changes: 2 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,14 @@ pup6.pe-oel-fips:
script:
- 'BEAKER_fips=yes bundle exec rake beaker:suites[default,oel]'

pup6-compliance-fips:
pup6.x-compliance-fips:
<<: *pup_6_x
<<: *compliance_base
script:
- 'BEAKER_fips=yes bundle exec rake beaker:suites[compliance,default]'

pup7-compliance-fips:
pup7.x-compliance-fips:
<<: *pup_7_x
<<: *compliance_base
script:
- 'BEAKER_fips=yes bundle exec rake beaker:suites[compliance,default]'

0 comments on commit 4fccde8

Please sign in to comment.