init
This commit is contained in:
parent
4e7d7023df
commit
b927a34a11
@ -4,9 +4,14 @@ metadata:
|
||||
name: pyversion
|
||||
spec:
|
||||
params:
|
||||
- name: subdirectory
|
||||
- name: home
|
||||
type: string
|
||||
description: Subdirectory within the repo where the source code is located
|
||||
description: home directory
|
||||
default: ""
|
||||
|
||||
- name: workshop
|
||||
type: string
|
||||
description: workshop within the repo where the source code is located
|
||||
default: ""
|
||||
|
||||
- name: ref
|
||||
@ -29,15 +34,11 @@ spec:
|
||||
steps:
|
||||
- name: verify-tag
|
||||
image: $(params.pythonImageName)
|
||||
workingDir: /workspace/source
|
||||
workingDir: /workspace/source/$(params.workshop)
|
||||
script: |
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [ -n "$(params.subdirectory)" ]; then
|
||||
cd "$(params.subdirectory)"
|
||||
fi
|
||||
|
||||
echo "🔍 Extracting tag from Git ref..."
|
||||
FULL_REF="$(params.ref)"
|
||||
TAG_FROM_REF=$(basename "$FULL_REF") # → v0.2.0
|
||||
|
@ -9,6 +9,11 @@ spec:
|
||||
description: home directory
|
||||
default: ""
|
||||
|
||||
- name: workshop
|
||||
type: string
|
||||
description: workshop directory
|
||||
default: ""
|
||||
|
||||
- name: keys
|
||||
type: string
|
||||
description: |
|
||||
@ -23,7 +28,7 @@ spec:
|
||||
steps:
|
||||
- name: extract
|
||||
image: python:3.11-slim
|
||||
workingDir: /workspace/shared/$(params.subdirectory)
|
||||
workingDir: /workspace/shared/$(params.workshop)
|
||||
env:
|
||||
- name: HOME
|
||||
value: /workspace/shared/$(params.home)
|
||||
|
@ -4,10 +4,14 @@ metadata:
|
||||
name: sonarqube-analysis
|
||||
spec:
|
||||
params:
|
||||
- name: subdirectory
|
||||
- name: home
|
||||
type: string
|
||||
default: ""
|
||||
description: Subdirectory within workspace containing the source (if any)
|
||||
description: home directory
|
||||
- name: workshop
|
||||
type: string
|
||||
default: ""
|
||||
description: workshop within workspace containing the source (if any)
|
||||
|
||||
- name: sonarHostUrl
|
||||
type: string
|
||||
@ -29,15 +33,11 @@ spec:
|
||||
steps:
|
||||
- name: sonar-scan
|
||||
image: sonarsource/sonar-scanner-cli:5
|
||||
workingDir: /workspace/source
|
||||
workingDir: /workspace/source/$(params.workshop)
|
||||
script: |
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ -n "$(params.subdirectory)" ]; then
|
||||
cd "$(params.subdirectory)"
|
||||
fi
|
||||
|
||||
SONAR_TOKEN=$(cat /workspace/sonar-auth/token)
|
||||
|
||||
echo "📡 Running SonarQube analysis on project $(params.projectKey)..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user