Drop initial code

This commit is contained in:
Danny Bessems
2026-01-15 09:58:01 +00:00
parent 227d957219
commit 1e7c9ba5cb
228 changed files with 19883 additions and 1 deletions

View File

@@ -0,0 +1,55 @@
tasks:
- checkout:
force-clean-build: 'true'
- script: |
#!/bin/bash
set -ex
docker run --rm --user 555:555 -v ${bamboo.hostvolume}:/code -w /code \
${bamboo.container_semrel} \
npx semantic-release \
--dry-run --repository-url https://${bamboo.httpsaccesskey_secret}@devstash.vanderlande.com/scm/ittp/as-vi-cnv.git \
--verifyRelease @semantic-release/exec \
--verifyReleaseCmd 'echo "${nextRelease.version}" > .version'
# Function to determine the version tag
get_version_tag() {
if [ -f .version ]; then
echo "$(cat .version)"
else
echo "$(git describe --abbrev=0 --tags | awk '{gsub("^v", ""); print}')"
fi
}
# Function to determine the commit hash
get_commit_hash() {
echo "$(git log -1 --pretty=format:%h)"
}
# Get version tag and commit hash
version_tag=$(get_version_tag)
commit_hash=$(get_commit_hash)
override=$(git log -1 --pretty=format:%s | grep -oP '\[docs-override v\K[^\]]+') || true
# Determine gtag and template_suffix based on branch
if [[ "${bamboo_planRepository_branch}" == "main" || "${bamboo_planRepository_branch}" =~ ^[0-9]+\.[0-9]+\.x$ ]]; then
template_suffix="${version_tag}"
elif [[ "${bamboo_planRepository_branch}" == docs-* && -n $override ]]; then
version_tag="${override}"
template_suffix="${override}"
else
template_suffix="${version_tag}-${commit_hash}"
fi
# Write to pipeline.parameters
echo -e "\ngtag=${version_tag}" >> pipeline.parameters
echo -e "\ntemplate_suffix=${template_suffix}" >> pipeline.parameters
- inject-variables:
file: pipeline.parameters
scope: RESULT
other:
clean-working-dir: true
requirements:
- system.docker.executable
- AGENT_TYPE: Linux_Base_Agent