🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

Butler build agent for Visual Studio Team Services

A topic by AllManyLots created Nov 10, 2017 Views: 115
Viewing posts 1 to 1

I have created a docker image based on the Microsoft provided vsts-agent image with butler installed. The image is available here: https://hub.docker.com/r/amllindsay/vsts-agent-itch-butler/

But if you want to create your own the dockerfile was pretty simple:

# Microsoft has a base image for vsts-agents and that is what we are using to base our container on
FROM microsoft/vsts-agent:ubuntu-16.04
# Download butler\set execute permissions on the butler file
RUN echo Downloading butler... \
 && curl -sL https://dl.itch.ovh/butler/linux-amd64/head/butler -o /usr/bin/butler \
 && chmod +x /usr/bin/butler
# run butler -V to output butler version for error checking
RUN /usr/bin/butler -V
# Add butler to the path to allow it to be run and key/value pair to the environment variables to tell vsts that it has the butler capability
ENV butler=/usr/bin/butler \

The build in VSTS is also pretty simple, just a command line task ( I used version 2 of the task type) with the following contents;

echo $(BUTLER_API_KEY) > ./token.txt
butler push  ./Github-Integration-CI/Game $(itchUser)/$(itchGame):$(itchChannel) -i ./token.txt

Note that $(BUTLER_API_KEY), $(itchUser), $(itchGame), and $(itchChannel) are all variables supplied to the task. Make sure the BUTLER_API_KEY is marked as a secret variable and then VSTS will keep it out of the logs.

There is probably a simpler way to do all this, but I thought it was pretty cool that this worked. Thanks for building butler!