There are two variants how to run local build server (aka ‘Extender’):
Before you can run a local cloud builder you need to install the following software:
Once you have the above mentioned software installed follow these steps to install and run the Defold cloud builders:
Note for Windows users: use git bash terminal for executing commands below.
Authorize to Google Cloud and create Application default credentials - You need to have a Google account when downloading the Docker container images so that we can monitor and ensure fair use of the public container registry and temporarily suspend accounts which download images excessively.
gcloud auth application-default login
Configure Docker to use Artifact registries - Docker needs to be configured to use gcloud
as a credential helper when downloading container images from the public container registry at europe-west1-docker.pkg.dev
.
gcloud auth configure-docker europe-west1-docker.pkg.dev
docker pull --platform linux/amd64 europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:latest
git clone https://github.com/defold/extender.git
cd extender
extender.jar
) and manifest merge tool (manifestmergetool.jar
):
TMP_DIR=$(pwd)/server/_tmp
APPLICATION_DIR=$(pwd)/server/app
# set nesessary version of Extender and Manifest merge tool
# versions can be found at Github release page https://github.com/defold/extender/releases
# or you can pull latest version (see code sample below)
EXTENDER_VERSION=2.6.5
MANIFESTMERGETOOL_VERSION=1.3.0
echo "Download prebuild jars to ${APPLICATION_DIR}"
rm -rf ${TMP_DIR}
mkdir -p ${TMP_DIR}
rm -rf ${APPLICATION_DIR}
mkdir -p ${APPLICATION_DIR}
gcloud artifacts files download \
--project=extender-426409 \
--location=europe-west1 \
--repository=extender-maven \
--destination=${TMP_DIR} \
com/defold/extender/server/${EXTENDER_VERSION}/server-${EXTENDER_VERSION}.jar
gcloud artifacts files download \
--project=extender-426409 \
--location=europe-west1 \
--repository=extender-maven \
--destination=${TMP_DIR} \
com/defold/extender/manifestmergetool/${MANIFESTMERGETOOL_VERSION}/manifestmergetool-${MANIFESTMERGETOOL_VERSION}.jar
cp ${TMP_DIR}/$(ls ${TMP_DIR} | grep server-${EXTENDER_VERSION}.jar) ${APPLICATION_DIR}/extender.jar
cp ${TMP_DIR}/$(ls ${TMP_DIR} | grep manifestmergetool-${MANIFESTMERGETOOL_VERSION}.jar) ${APPLICATION_DIR}/manifestmergetool.jar
docker compose -p extender -f server/docker/docker-compose.yml --profile <profile> up
where profile can be:
docker compose
argumets see https://docs.docker.com/reference/cli/docker/compose/.When docker compose is up you can use http://localhost:9000 as Build server address in Editor’s preference or as --build-server
value if you use Bob to build the project.
Several profiles can be passed to command line. For example:
docker compose -p extender -f server/docker/docker-compose.yml --profile android --profile web --profile windows up
Example above runs frontend, Android, Web, Windows instances.
To stop services - Press Ctrl+C if docker compose runs in non-detached mode, or
docker compose -p extender down
if docker compose was run in detached mode (e.g. ‘-d’ flag was passed to docker compose up
command).
If you want to pull latest versions of jars you can use following command to determine latest version
EXTENDER_VERSION=$(gcloud artifacts versions list \
--location=europe-west1 \
--repository=extender-maven \
--package="com.defold.extender:server" \
--sort-by="~createTime" \
--limit=1 \
--format="get(name)" | awk -F'/' '{print $NF}')
MANIFESTMERGETOOL_VERSION=$(gcloud artifacts versions list \
--location=europe-west1 \
--repository=extender-maven \
--package="com.defold.extender:manifestmergetool" \
--sort-by="~createTime" \
--limit=1 \
--format="get(name)" | awk -F'/' '{print $NF}')
The macOS and iOS builds are done on real Apple hardware using a build server running in stand-alone mode without Docker. Instead XCode, Java and other required tools are installed directly on the machine and the build server is running as a normal Java process. You can learn how to set this up in the build server documentation on GitHub.
Please follow the instructions in the Extender repository on GitHub to manually build and run a local build server.
Did you spot an error or do you have a suggestion? Please let us know on GitHub!
GITHUB