Lavalink icon indicating copy to clipboard operation
Lavalink copied to clipboard

Docker Versioning is broken

Open schnapster opened this issue 5 years ago • 2 comments

This looks pretty broken:

Screenshot_20190812-090855

I believe it can only be fixed on the CI side where the release script runs.

schnapster avatar Aug 12 '19 07:08 schnapster

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\=

freyacodes avatar Aug 12 '19 14:08 freyacodes

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

schnapster avatar Aug 12 '19 17:08 schnapster

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

topi314 avatar Oct 31 '22 11:10 topi314