Skip to content

Commit

Permalink
Updating the file names
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasm-ttd committed Mar 20, 2024
1 parent 30ddba6 commit fafd018
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 40 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/publish-all-operators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Download public manifest
uses: actions/download-artifact@v4
with:
pattern: image-*
pattern: public-image-*
path: ./manifests/public_operator

- name: Download GCP manifest
Expand All @@ -132,36 +132,28 @@ jobs:
- name: Download AWS manifest
uses: actions/download-artifact@v4
with:
pattern: '*-enclave-id*'
pattern: 'aws-enclave-id*'
path: ./manifests/aws_nitro_operator

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: uid2-operator-release-${{ needs.start.outputs.new_version }}-manifests
path: ./manifests/
path: ./manifests

release:
name: Create Release
runs-on: ubuntu-latest
needs: [start, buildPublic, buildGCP, buildAzure, buildAWS]
needs: [start, collectAllArtifacts]
steps:
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ needs.start.outputs.new_version }}-<ENCLAVE_PROTOCOL>
- name: Build changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
toTag: v${{ needs.start.outputs.new_version }}
configurationJson: |
{
"template": "#{{CHANGELOG}}\n## Installation\n```\ndocker pull ${{ steps.meta.outputs.tags }}\n```\n\n## Image reference to deploy: \n```\n${{ steps.meta.outputs.tags }}\n```\n\n## Changelog\n#{{UNCATEGORIZED}}",
"template": "\n## Integration Guides\n[AWS Marketplace](https://unifiedid.com/docs/guides/operator-guide-aws-marketplace)\n[GCP Confidential Space](https://unifiedid.com/docs/guides/operator-private-gcp-confidential-space)\n[Microsoft Azure](https://unifiedid.com/docs/guides/operator-guide-azure-enclave)\n\n## Installation\n```\ndocker pull us-docker.pkg.dev/uid2-prod-project/iabtechlab/uid2-operator:${{ needs.start.outputs.new_version }}-gcp-oidc\ndocker pull ghcr.io/iabtechlab/uid2-operator:${{ needs.start.outputs.new_version }}-azure-cc\n```\n## Changelog\n#{{CHANGELOG}}\n#{{UNCATEGORIZED}}",
"pr_template": " - #{{TITLE}} - ( PR: ##{{NUMBER}} )"
}
env:
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/publish-aws-nitro-enclave-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
type: ${{ inputs.release_type }}
version_number: ${{ inputs.version_number_input }}
branch_name: ${{ github.ref }}

- name: Update pom.xml
id: updatePom
run: |
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Save UID2 eif artifact
uses: actions/upload-artifact@v4
with:
name: uid2-nitro-deployment-files-${{ steps.version.outputs.new_version }}
name: aws-uid2-deployment-files-${{ steps.version.outputs.new_version }}
path: ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/uid2
if-no-files-found: error

Expand All @@ -128,15 +128,15 @@ jobs:
- name: Save EUID eif artifact
uses: actions/upload-artifact@v4
with:
name: euid-nitro-deployment-files-${{ steps.version.outputs.new_version }}
name: aws-euid-deployment-files-${{ steps.version.outputs.new_version }}
path: ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/euid
if-no-files-found: error

- name: Save Enclave Ids
run: |
mkdir -p ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/manifests
echo ${{ steps.build_uid2_eif.outputs.enclave_id }} >> ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/manifests/uid2-enclave-id-${{ steps.version.outputs.new_version }}.txt
echo ${{ steps.build_euid_eif.outputs.enclave_id }} >> ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/manifests/euid-enclave-id-${{ steps.version.outputs.new_version }}.txt
echo ${{ steps.build_uid2_eif.outputs.enclave_id }} >> ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/manifests/aws-uid2-enclave-id-${{ steps.version.outputs.new_version }}.txt
echo ${{ steps.build_euid_eif.outputs.enclave_id }} >> ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/manifests/aws-euid-enclave-id-${{ steps.version.outputs.new_version }}.txt
- name: Save Manifests as build artifacts
uses: actions/upload-artifact@v4
Expand All @@ -148,10 +148,8 @@ jobs:
- name: Generate release archive files
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.is_release == 'true' }}
run: |
ls -l ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/uid2
ls -l ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/euid
zip -j ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/uid2-nitro-deployment-artifacts-${{ steps.version.outputs.new_version }}.zip ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/uid2/*
zip -j ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/euid-nitro-deployment-artifacts-${{ steps.version.outputs.new_version }}.zip ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/euid/*
zip -j ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/aws-uid2-deployment-artifacts-${{ steps.version.outputs.new_version }}.zip ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/uid2/*
zip -j ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/aws-euid-deployment-artifacts-${{ steps.version.outputs.new_version }}.zip ${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/euid/*
- name: Build changelog
id: github_release
Expand All @@ -174,8 +172,8 @@ jobs:
body: ${{ steps.github_release.outputs.changelog }}
draft: true
files: |
${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/uid2-nitro-deployment-artifacts-${{ steps.version.outputs.new_version }}.zip
${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/euid-nitro-deployment-artifacts-${{ steps.version.outputs.new_version }}.zip
${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/manifests/uid2-enclave-id-${{ steps.version.outputs.new_version }}.txt
${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/manifests/euid-enclave-id-${{ steps.version.outputs.new_version }}.txt
${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/aws-uid2-deployment-artifacts-${{ steps.version.outputs.new_version }}.zip
${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/aws-euid-deployment-artifacts-${{ steps.version.outputs.new_version }}.zip
${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/manifests/aws-uid2-enclave-id-${{ steps.version.outputs.new_version }}.txt
${{ env.ARTIFACTS_BASE_OUTPUT_DIR }}/manifests/aws-euid-enclave-id-${{ steps.version.outputs.new_version }}.txt
8 changes: 4 additions & 4 deletions .github/workflows/publish-azure-cc-enclave-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ jobs:
- name: Upload deployment artifacts
uses: actions/upload-artifact@v4
with:
name: azure-cc-deployment-files
name: azure-cc-deployment-files-${{ steps.version.outputs.new_version }}
path: ${{ env.ARTIFACTS_OUTPUT_DIR }}
if-no-files-found: error

- name: Upload manifest
uses: actions/upload-artifact@v4
with:
name: azure-cc-enclave-id
name: azure-cc-enclave-id-${{ steps.version.outputs.new_version }}
path: ${{ env.MANIFEST_OUTPUT_DIR }}
if-no-files-found: error

Expand Down Expand Up @@ -256,8 +256,8 @@ jobs:
body: ${{ steps.github_release.outputs.changelog }}
draft: true
files: |
${{ env.ARTIFACTS_OUTPUT_DIR }}/uid2-operator-deployment-artifacts-${{ steps.meta.outputs.version }}.zip
${{ env.MANIFEST_OUTPUT_DIR }}/azure-cc-operator-digest-${{ steps.meta.outputs.version }}.txt
${{ env.ARTIFACTS_OUTPUT_DIR }}/uid2-operator-deployment-artifacts-${{ steps.version.outputs.new_version }}.zip
${{ env.MANIFEST_OUTPUT_DIR }}/azure-cc-operator-digest-${{ steps.version.outputs.new_version }}.txt
e2e:
name: E2E
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-gcp-oidc-enclave-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,21 +255,21 @@ jobs:
- name: Upload deployment artifacts
uses: actions/upload-artifact@v4
with:
name: gcp-oidc-deployment-files-${{ steps.meta.outputs.version }}
name: gcp-oidc-deployment-files-${{ steps.version.outputs.new_version }}
path: ${{ env.ARTIFACTS_OUTPUT_DIR }}
if-no-files-found: error

- name: Upload manifest artifacts
uses: actions/upload-artifact@v4
with:
name: gcp-oidc-enclave-ids-${{ steps.meta.outputs.version }}
name: gcp-oidc-enclave-ids-${{ steps.version.outputs.new_version }}
path: ${{ env.MANIFEST_OUTPUT_DIR }}
if-no-files-found: error

- name: Generate release archive
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.is_release == 'true' }}
run: |
zip -j ${{ env.ARTIFACTS_OUTPUT_DIR }}/uid2-operator-deployment-artifacts-${{ steps.meta.outputs.version }}.zip ${{ env.ARTIFACTS_OUTPUT_DIR }}/*
zip -j ${{ env.ARTIFACTS_OUTPUT_DIR }}/gcp-oidc-deployment-files-${{ steps.version.outputs.new_version }}.zip ${{ env.ARTIFACTS_OUTPUT_DIR }}/*
- name: Build changelog
id: github_release
Expand All @@ -292,9 +292,9 @@ jobs:
body: ${{ steps.github_release.outputs.changelog }}
draft: true
files: |
${{ env.ARTIFACTS_OUTPUT_DIR }}/uid2-operator-deployment-artifacts-${{ steps.meta.outputs.version }}.zip
${{ env.MANIFEST_OUTPUT_DIR }}/enclave_id_${{ steps.meta.outputs.version }}.txt
${{ env.MANIFEST_OUTPUT_DIR }}/enclave_id_debug_${{ steps.meta.outputs.version }}.txt
${{ env.ARTIFACTS_OUTPUT_DIR }}/gcp-oidc-deployment-files-${{ steps.version.outputs.new_version }}.zip
${{ env.MANIFEST_OUTPUT_DIR }}/gcp-oidc-enclave-id-${{ steps.version.outputs.new_version }}.txt
${{ env.MANIFEST_OUTPUT_DIR }}/gcp-oidc-enclave-id-debug-${{ steps.version.outputs.new_version }}.txt
e2e:
name: E2E
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-public-operator-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ jobs:
mkdir -p image-details
IMAGE_TAG=${{ needs.image.outputs.image_tag }}
IMAGE=$(jq -n --arg img "$IMAGE_TAG" '{image_tag: $img}')
echo $IMAGE > image-details/image_$IMAGE_TAG.json
echo $IMAGE > image-details/public-image-$IMAGE_TAG.json
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: image_${{ needs.image.outputs.image_tag }}
name: public-image-${{ needs.image.outputs.image_tag }}
path: image-details/
4 changes: 2 additions & 2 deletions scripts/gcp-oidc/generate-deployment-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ if [[ $? -ne 0 ]]; then
fi

# Enclave ID file
echo -n "V1,false,$IMAGE_DIGEST" | openssl dgst -sha256 -binary | openssl base64 > ${MANIFEST_DIR}/enclave_id_$VERSION_NUMBER.txt
echo -n "V1,false,$IMAGE_DIGEST" | openssl dgst -sha256 -binary | openssl base64 > ${MANIFEST_DIR}/gcp-oidc-enclave-id-$VERSION_NUMBER.txt
if [[ $? -ne 0 ]]; then
echo "Failed to generate non-debug enclave ID file"
exit 1
fi

# Enclave ID file for debug
echo -n "V1,true,$IMAGE_DIGEST" | openssl dgst -sha256 -binary | openssl base64 > ${MANIFEST_DIR}/enclave_id_debug_$VERSION_NUMBER.txt
echo -n "V1,true,$IMAGE_DIGEST" | openssl dgst -sha256 -binary | openssl base64 > ${MANIFEST_DIR}/gcp-oidc-enclave-id-debug-$VERSION_NUMBER.txt
if [[ $? -ne 0 ]]; then
echo "Failed to generate debug enclave ID file"
exit 1
Expand Down

0 comments on commit fafd018

Please sign in to comment.