Skip to content

Commit

Permalink
add git as source (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Schrodi authored May 11, 2021
1 parent 86bf420 commit 50c66fe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .ci/component_descriptor
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ set -o pipefail

SOURCE_PATH="$(dirname $0)/.."
VERSION="$(${SOURCE_PATH}/hack/get-version.sh)"
COMMIT_SHA="$(git --git-dir ${SOURCE_PATH}/.git rev-parse HEAD)"

printf "> Building components with version ${VERSION}\n"
printf "> Building components with version ${VERSION} - ${COMMIT_SHA}\n"

REPO_CTX="${CURRENT_COMPONENT_REPOSITORY}"

Expand All @@ -27,7 +28,9 @@ function buildComponentArchive() {
--component-name=github.com/gardener/landscaper/${COMPONENT_NAME} \
--component-version=${VERSION} \
--repo-ctx=${REPO_CTX} \
-s ${SOURCE_PATH}/.landscaper/sources.yaml \
-r ${SOURCE_PATH}/.landscaper/${COMPONENT_NAME}/resources.yaml \
COMMIT_SHA=${COMMIT_SHA} \
VERSION=${VERSION}
}

Expand Down
14 changes: 14 additions & 0 deletions .landscaper/sources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: github_com_gardener_landscaper
type: git
version: ${VERSION}
labels:
- name: cloud.gardener/cicd/source
value:
repository-classification: main
access:
type: github
commit: ${COMMIT_SHA}
ref: refs/tags/${VERSION}
repoUrl: github.com/gardener/landscaper
---

0 comments on commit 50c66fe

Please sign in to comment.