Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
test: simplify release
Browse files Browse the repository at this point in the history
  • Loading branch information
paralta committed Feb 26, 2024
1 parent f18163f commit 2a6cf13
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 198 deletions.
106 changes: 4 additions & 102 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,118 +10,17 @@ permissions:
contents: write

jobs:
verification:
name: Verification
uses: ./.github/workflows/reusable-verification.yml
secrets: inherit

build_and_push:
needs:
- verification
- artifacts
- publish_helm
name: Build & Push
uses: ./.github/workflows/reusable-build-and-push.yml
with:
image_tag: ${{ github.ref_name }}
push: true
use_release_repository: true

publish_helm:
needs: verification
name: Publish Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Create Helm Chart package
env:
VERSION: ${{ github.ref_name }}
run: make dist-helm-chart

- name: Login to GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Package and Publish Helm Chart
env:
VERSION: ${{ github.ref_name }}
run: make publish-helm-chart

artifacts:
name: Create artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
# NOTE(chrisgacsal): Use actions/cache for caching Go dependency and build caches
# as if provides better flexibility like setting the cache key which reduces cache misses significantly.
cache: false
go-version-file: '.go-version'

- name: Setup Go caching
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ github.ref_name }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ github.ref_name }}-
${{ runner.os }}-go-${{ github.event.repository.default_branch }}-
- name: Create vmclarity-cli manifest(s)
env:
VERSION: ${{ github.ref_name }}
run: make dist-vmclarity-cli

- name: Create Cloudformation manifest(s)
env:
VERSION: ${{ github.ref_name }}
run: make dist-cloudformation

- name: Create Azure Bicep manifest(s)
env:
VERSION: ${{ github.ref_name }}
run: make dist-bicep

- name: Create Docker Compose manifest(s)
env:
VERSION: ${{ github.ref_name }}
run: make dist-docker-compose

- name: Create Google Cloud Deployment manifest(s)
env:
VERSION: ${{ github.ref_name }}
run: make dist-gcp-deployment

- name: Upload
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: artifacts
path: |
dist/*.tar.gz
dist/*.tgz
dist/*.sha256sum
dist/bicep/vmclarity.json
dist/bicep/vmclarity-UI.json
if-no-files-found: error
compression-level: 0

prerelease:
needs:
- verification
- build_and_push
- publish_helm
- artifacts
name: Release
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -156,7 +55,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
tags: ["uibackend/types", "uibackend/server", "uibackend/client", "core", "provider", "utils", "installation", "cli", "testenv", "api/types", "api/server", "api/client", "e2e", "containerruntimediscovery/types", "containerruntimediscovery/server", "containerruntimediscovery/client", "orchestrator"]
tags:
- "containerruntimediscovery/types"
- "containerruntimediscovery/server"
- "containerruntimediscovery/client"
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
registry_name:
required: false
type: string
description: 'Registry name used for container image names. Default is `ghcr.io/openclarity`.'
default: ghcr.io/openclarity
description: 'Registry name used for container image names. Default is `ghcr.io/paralta`.'
default: ghcr.io/paralta
image_tag:
required: true
type: string
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-end-to-end-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
registry_name:
required: false
type: string
description: 'Registry name used for container image names. Default is `ghcr.io/openclarity`.'
default: ghcr.io/openclarity
description: 'Registry name used for container image names. Default is `ghcr.io/paralta`.'
default: ghcr.io/paralta
use_release_repository:
required: false
type: boolean
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/reusable-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make license-cache

- name: Check licenses
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make license-check

distributions:
runs-on: ubuntu-latest
steps:
Expand Down
78 changes: 0 additions & 78 deletions .github/workflows/semantic-pr.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SHELL = /usr/bin/env bash -o pipefail
####

VERSION ?= $(shell git rev-parse --short HEAD)
DOCKER_REGISTRY ?= ghcr.io/openclarity
DOCKER_REGISTRY ?= ghcr.io/paralta
DOCKER_PUSH ?= false
DOCKER_TAG ?= $(VERSION)
VMCLARITY_TOOLS_BASE ?=
Expand All @@ -29,7 +29,7 @@ BUILD_TIMESTAMP := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
COMMIT_HASH := $(shell git rev-parse HEAD)
INSTALLATION_DIR := $(ROOT_DIR)/installation
HELM_CHART_DIR := $(INSTALLATION_DIR)/kubernetes/helm
HELM_OCI_REPOSITORY := ghcr.io/openclarity/charts
HELM_OCI_REPOSITORY := ghcr.io/paralta/charts
DIST_DIR ?= $(ROOT_DIR)/dist

####
Expand Down
9 changes: 2 additions & 7 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Documentation available at: https://docs.docker.com/build/bake/

# Docker build args
variable "DOCKER_REGISTRY" {default = "ghcr.io/openclarity"}
variable "DOCKER_REGISTRY" {default = "ghcr.io/paralta"}
variable "DOCKER_TAG" {default = "latest"}
variable "SUFFIX" {default = ""}

Expand All @@ -19,12 +19,7 @@ function "get_tag" {

group "default" {
targets = [
"vmclarity-apiserver",
"vmclarity-cli",
"vmclarity-cr-discovery-server",
"vmclarity-orchestrator",
"vmclarity-ui",
"vmclarity-ui-backend"
"vmclarity-cr-discovery-server"
]
}

Expand Down

0 comments on commit 2a6cf13

Please sign in to comment.