From 92de2fa45263f0afec0de91fbf90fabdc84e7ba2 Mon Sep 17 00:00:00 2001 From: BAK BYEONG JUN Date: Tue, 15 Apr 2025 13:13:16 +0000 Subject: [PATCH] init --- tasks/docker-registry/task.yaml | 6 +++--- tasks/nodejs-nx-analysis/task.yaml | 4 ++-- tasks/nodejs-nx-version/task.yaml | 4 ++-- tasks/pybuild/task.yaml | 6 +++--- tasks/pylint/task.yaml | 8 ++++---- tasks/pypi/task.yaml | 4 ++-- tasks/pytest/task.yaml | 12 ++++++------ tasks/pyversion/task.yaml | 6 +++--- tasks/sonarqube-analysis/taks.yaml | 6 +++--- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tasks/docker-registry/task.yaml b/tasks/docker-registry/task.yaml index 0a1d9a3..eed250a 100644 --- a/tasks/docker-registry/task.yaml +++ b/tasks/docker-registry/task.yaml @@ -33,7 +33,7 @@ spec: description: Build context path (relative to workshop) workspaces: - - name: source + - name: shared description: Source code workspace - name: docker-dot-credentials description: Workspace containing config.json (as Secret) @@ -45,7 +45,7 @@ spec: steps: - name: prepare-docker-auth image: alpine:3.21.3 - workingDir: /workspace/source/$(params.workshop) + workingDir: /workspace/shared/$(params.workshop) env: - name: HOME value: /workspace/shared/$(params.home) @@ -64,7 +64,7 @@ spec: - name: kaniko-build image: gcr.io/kaniko-project/executor:v1.23.2 - workingDir: $(workspaces.source.path)/$(params.workshop) + workingDir: $(workspaces.shared.path)/$(params.workshop) env: - name: DOCKER_CONFIG value: /tekton/home/.docker diff --git a/tasks/nodejs-nx-analysis/task.yaml b/tasks/nodejs-nx-analysis/task.yaml index 494feb6..b674e5e 100644 --- a/tasks/nodejs-nx-analysis/task.yaml +++ b/tasks/nodejs-nx-analysis/task.yaml @@ -24,7 +24,7 @@ spec: description: Node.js image (e.g., node:18-slim) workspaces: - - name: source + - name: shared description: Git-cloned source code with Nx monorepo results: @@ -36,7 +36,7 @@ spec: steps: - name: lint-and-test image: $(params.nodejsImageName) - workingDir: /workspace/source/$(params.workshop) + workingDir: /workspace/shared/$(params.workshop) env: - name: HOME value: /workspace/shared/$(params.home) diff --git a/tasks/nodejs-nx-version/task.yaml b/tasks/nodejs-nx-version/task.yaml index f13e6a1..e1cbafb 100644 --- a/tasks/nodejs-nx-version/task.yaml +++ b/tasks/nodejs-nx-version/task.yaml @@ -21,7 +21,7 @@ spec: default: "node:slim" description: Node.js image (e.g., node:23-slim) workspaces: - - name: source + - name: shared description: Git-cloned source code results: - name: version @@ -29,7 +29,7 @@ spec: steps: - name: verify-tag-version image: $(params.nodejsImageName) - workingDir: /workspace/source/$(params.workshop) + workingDir: /workspace/shared/$(params.workshop) env: - name: HOME value: /workspace/shared/$(params.home) diff --git a/tasks/pybuild/task.yaml b/tasks/pybuild/task.yaml index 7121773..79cab64 100644 --- a/tasks/pybuild/task.yaml +++ b/tasks/pybuild/task.yaml @@ -20,7 +20,7 @@ spec: description: Python version to use workspaces: - - name: source + - name: shared description: Workspace containing the cloned Git repository results: @@ -30,7 +30,7 @@ spec: steps: - name: build-package image: $(params.pythonImageName) - workingDir: /workspace/source/$(params.workshop) + workingDir: /workspace/shared/$(params.workshop) env: - name: HOME value: /workspace/shared/$(params.home) @@ -67,7 +67,7 @@ spec: fi echo "๐Ÿ“‚ Checking built artifacts..." - BUILD_PATH="/workspace/source/$(params.workshop)/dist" + BUILD_PATH="/workspace/shared/$(params.workshop)/dist" echo -n "$BUILD_PATH" > /tekton/results/build-artifact-path if [ -d "$BUILD_PATH" ] && [ -n "$(ls -A "$BUILD_PATH")" ]; then diff --git a/tasks/pylint/task.yaml b/tasks/pylint/task.yaml index b398a62..5041f5c 100644 --- a/tasks/pylint/task.yaml +++ b/tasks/pylint/task.yaml @@ -11,7 +11,7 @@ spec: - name: workshop type: string - description: workshop within the repo where the source code is located + description: workshop within the repo where the shared code is located default: "" - name: pythonImageName @@ -36,13 +36,13 @@ spec: description: Exit code returned by pylint (0=clean, non-zero=issues) workspaces: - - name: source + - name: shared description: Workspace containing the cloned Git repository steps: - name: run-pylint image: $(params.pythonImageName) - workingDir: /workspace/source/$(params.workshop) + workingDir: /workspace/shared/$(params.workshop) env: - name: HOME value: /workspace/shared/$(params.home) @@ -70,7 +70,7 @@ spec: echo "๐Ÿงช Running Pylint (JSON report)..." set +e - REPORT_FILE="/workspace/source/pylint-report.json" + REPORT_FILE="/workspace/shared/pylint-report.json" if [ -f pyproject.toml ]; then poetry run pylint $(params.pylint-args) --output-format=json . > "$REPORT_FILE" diff --git a/tasks/pypi/task.yaml b/tasks/pypi/task.yaml index 1d27b1a..08aa8d4 100644 --- a/tasks/pypi/task.yaml +++ b/tasks/pypi/task.yaml @@ -23,13 +23,13 @@ spec: default: https://upload.pypi.org/legacy/ workspaces: - - name: source + - name: shared description: Workspace containing the built artifacts steps: - name: upload-to-pypi image: $(params.pythonImageName) - workingDir: /workspace/source + workingDir: /workspace/shared env: - name: HOME value: /workspace/shared/$(params.home) diff --git a/tasks/pytest/task.yaml b/tasks/pytest/task.yaml index 9344ee7..a448bc7 100644 --- a/tasks/pytest/task.yaml +++ b/tasks/pytest/task.yaml @@ -20,13 +20,13 @@ spec: default: "python:3.11-slim" workspaces: - - name: source + - name: shared description: Workspace containing the cloned Git repository from git-clone-checkout steps: - name: install-dependencies image: $(params.pythonImageName) - workingDir: /workspace/source/$(params.workshop) + workingDir: /workspace/shared/$(params.workshop) env: - name: HOME value: /workspace/shared/$(params.home) @@ -59,17 +59,17 @@ spec: echo "๐Ÿงช Running tests..." set +e if [ -f pyproject.toml ]; then - poetry run pytest --verbose --junitxml=/workspace/source/pytest-results.xml + poetry run pytest --verbose --junitxml=/workspace/shared/pytest-results.xml else - pytest --verbose --junitxml=/workspace/source/pytest-results.xml + pytest --verbose --junitxml=/workspace/shared/pytest-results.xml fi TEST_EXIT_CODE=$? set -e echo "๐Ÿ“„ Checking test results..." - if [ -f /workspace/source/pytest-results.xml ]; then + if [ -f /workspace/shared/pytest-results.xml ]; then echo "Test results:" - cat /workspace/source/pytest-results.xml + cat /workspace/shared/pytest-results.xml else echo "โŒ No test results found" exit 1 diff --git a/tasks/pyversion/task.yaml b/tasks/pyversion/task.yaml index 7c987f4..74746fe 100644 --- a/tasks/pyversion/task.yaml +++ b/tasks/pyversion/task.yaml @@ -24,8 +24,8 @@ spec: default: "python:3.11-slim" workspaces: - - name: source - description: Source code workspace (includes pyproject.toml) + - name: shared + description: shared code workspace (includes pyproject.toml) results: - name: version @@ -34,7 +34,7 @@ spec: steps: - name: verify-tag image: $(params.pythonImageName) - workingDir: /workspace/source/$(params.workshop) + workingDir: /workspace/shared/$(params.workshop) script: | #!/usr/bin/env bash set -e diff --git a/tasks/sonarqube-analysis/taks.yaml b/tasks/sonarqube-analysis/taks.yaml index dfb8f0b..3a70c10 100644 --- a/tasks/sonarqube-analysis/taks.yaml +++ b/tasks/sonarqube-analysis/taks.yaml @@ -23,8 +23,8 @@ spec: description: SonarQube project key workspaces: - - name: source - description: Workspace with source code (e.g. from git-clone) + - name: shared + description: Workspace with shared code (e.g. from git-clone) - name: sonar-auth description: | @@ -33,7 +33,7 @@ spec: steps: - name: sonar-scan image: sonarsource/sonar-scanner-cli:5 - workingDir: /workspace/source/$(params.workshop) + workingDir: /workspace/shared/$(params.workshop) script: | #!/bin/sh set -e