Lavalink
Lavalink copied to clipboard
Docker Versioning is broken
This looks pretty broken:
I believe it can only be fixed on the CI side where the release script runs.
What is the intended result? This is still your script.
Edit: Script for reference
CHANNEL=$(echo %teamcity.build.branch% | sed -e 's/refs\/heads\///g' | sed -e 's/\//_/g')
FULL_VERSION_TAG=v$(cat VERSION.txt)
CHANNEL_FULL_VERSION_TAG=$CHANNEL-$FULL_VERSION_TAG
echo "Full version tag: $CHANNEL_FULL_VERSION_TAG"
MAJOR_VERSION_TAG=$(cat VERSION.txt | sed -rn 's/^([0-9]+)\..*$/v\1/p')
CHANNEL_MAJOR_VERSION_TAG=$CHANNEL-$MAJOR_VERSION_TAG
echo "Major version tag: $CHANNEL_MAJOR_VERSION_TAG"
GIT_HASH=%dep.Lavalink_Build.build.vcs.number%
echo "Full git hash: $GIT_HASH"
GIT_HASH_SHORT=$(echo $GIT_HASH | sed 's/\(.\{8\}\).*/\1/')
echo "Git hash version tag: $GIT_HASH_SHORT"
echo "Building docker images"
docker build \
-t "fredboat/lavalink:$CHANNEL" \
-t "fredboat/lavalink:$CHANNEL_FULL_VERSION_TAG" \
-t "fredboat/lavalink:$CHANNEL_MAJOR_VERSION_TAG" \
-t "fredboat/lavalink:$GIT_HASH_SHORT" \
.
echo "Publishing docker images"
echo "%env.DOCKER_PASSWORD%" | docker login -u="%env.DOCKER_USERNAME%" --password-stdin
docker push "fredboat/lavalink:$GIT_HASH_SHORT"
docker push "fredboat/lavalink:$CHANNEL"
docker push "fredboat/lavalink:$CHANNEL_FULL_VERSION_TAG"
docker push "fredboat/lavalink:$CHANNEL_MAJOR_VERSION_TAG"
docker logout
curl -X POST https://hooks.microbadger.com/images/fredboat/lavalink/qYSIv07HxdrNus4IQCigBoTfekY\=
I believe with the version now including the api, the result should be versions like:
$BRANCH $BRANCH-$API $BRANCH-$API.$MAJOR $BRANCH-$API.$MAJOR.$MINOR.$PATCH $GIT_HASH_SHORT
with v3.5.0
we switched to using github actions. This uses a different method to generate the tags. This should have been fixed with that