Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/check
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -o pipefail
# For the check step concourse will set the following environment variables:
# SOURCE_PATH - path to component repository root directory.

if [[ -z "${SOURCE_PATH}" ]]; then
if [[ -z "${SOURCE_PATH:-}" ]]; then
export SOURCE_PATH="$(readlink -f "$(dirname ${0})/..")"
else
export SOURCE_PATH="$(readlink -f ${SOURCE_PATH})"
Expand All @@ -26,7 +26,7 @@ go fmt ./...
go install github.com/securego/gosec/v2/cmd/[email protected]

echo "> Run SAST scan"
make sast
make sast-report

curl -s "https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3" | bash -s -- --version 'v3.5.4'

Expand Down
79 changes: 0 additions & 79 deletions .ci/pipeline_definitions

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build

on:
workflow_call:
inputs:
mode:
required: true
type: string
default: snapshot
description: |
The build mode to use. It can be either `snapshot` or `release`.
Will affect effective version calculation, as well as target-oci-registry.

jobs:
prepare:
uses: gardener/cc-utils/.github/workflows/prepare.yaml@master
with:
mode: ${{ inputs.mode }}
permissions:
contents: read

oci-images:
name: Build OCI-Images
needs:
- prepare
permissions:
contents: read
packages: write
id-token: write
secrets: inherit
uses: gardener/cc-utils/.github/workflows/oci-ocm.yaml@master
strategy:
matrix:
args:
- name: oidc-webhook-authenticator
target:
oci-repository: gardener/oidc-webhook-authenticator
with:
name: ${{ matrix.args.name }}
version: ${{ needs.prepare.outputs.version }}
target: ${{ matrix.args.target }}
oci-registry: ${{ needs.prepare.outputs.oci-registry }}
oci-repository: ${{ matrix.args.oci-repository }}
oci-platforms: linux/amd64,linux/arm64

sast-lint:
uses: gardener/cc-utils/.github/workflows/sastlint-ocm.yaml@master
permissions:
contents: read
with:
linter: gosec
run: .ci/check
27 changes: 27 additions & 0 deletions .github/workflows/non-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build
on:
push:
branches:
- master
- releases/**
pull_request:

jobs:
build:
uses: ./.github/workflows/build.yaml
with:
mode: snapshot
secrets: inherit
permissions:
contents: write
packages: write
id-token: write

component-descriptor:
uses: gardener/cc-utils/.github/workflows/post-build.yaml@master
needs:
- build
secrets: inherit
permissions:
id-token: write
contents: write
34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release
on:
workflow_dispatch:
inputs:
next-version:
type: choice
options:
- bump-minor
- bump-patch


jobs:
build:
uses: ./.github/workflows/build.yaml
permissions:
contents: write
id-token: write
packages: write
with:
mode: release

release-to-github-and-bump:
uses: gardener/cc-utils/.github/workflows/release.yaml@master
needs:
- build
secrets: inherit
permissions:
contents: write
id-token: write
packages: write
with:
release-commit-target: branch
next-version: ${{ inputs.next-version }}
slack-channel-id: C9CEBQPGE # #sap-tech-gardener
15 changes: 15 additions & 0 deletions .ocm/base-component.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
labels:
- name: cloud.gardener.cnudie/responsibles
value:
- type: githubUser
username: dimityrmirchev
- type: githubUser
username: vpnachev

main-source:
labels:
- name: cloud.gardener.cnudie/dso/scanning-hints/source_analysis/v1
value:
policy: skip
comment: |
we use gosec for sast scanning. See attached log.
Loading