Removed old build script
This commit is contained in:
parent
d500fe8f51
commit
d5e743c6e3
15
Readme.md
15
Readme.md
@ -3,19 +3,18 @@
|
|||||||
Jenkins pipeline to build a Docker image of Geyser Standalone.
|
Jenkins pipeline to build a Docker image of Geyser Standalone.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
build.sh # the old pipeline script, not used anymore
|
Dockerfile # used to build the Docker image
|
||||||
Dockerfile # used to build the image
|
Jenkinsfile # the pipeline file
|
||||||
Jenkinsfile # the new pipeline script
|
|
||||||
Readme.md # you are reading this file
|
Readme.md # you are reading this file
|
||||||
run.sh # entrypoint of the docker image
|
run.sh # entrypoint of the Docker image
|
||||||
```
|
```
|
||||||
|
|
||||||
## Pipeline process
|
## Pipeline process
|
||||||
|
|
||||||
- Fetches the information about the latest build of Geyser (version, build number), from the [GeyserMC API](https://download.geysermc.org/v2/projects)
|
1. Fetches the information about the latest build of Geyser (version, build number), from the [GeyserMC API](https://download.geysermc.org/v2/projects)
|
||||||
- Downloads the Geyser Standalone jar file.
|
2. Downloads the Geyser Standalone jar file.
|
||||||
- Builds the docker image with the downloaded jar and the entrypoint script.
|
3. Builds the docker image with the downloaded jar and the entrypoint script.
|
||||||
- Pushes the image to the container registry with the tags `latest` and `$geyser_version-$geyser_build` (e.g. `2.2.0-408`)
|
4. Pushes the image to the container registry with the tags `latest` and `$geyser_version-$geyser_build` (e.g. `2.2.0-408`)
|
||||||
|
|
||||||
## Docker Compose Example
|
## Docker Compose Example
|
||||||
|
|
||||||
|
41
build.sh
41
build.sh
@ -1,41 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
URL_BUILD='https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest'
|
|
||||||
|
|
||||||
echo "Getting Geyser last build infos..."
|
|
||||||
|
|
||||||
# get paper build version
|
|
||||||
if ! curl -L -s $URL_BUILD -o build_infos.json; then
|
|
||||||
echo -e "Error: Can't join API"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! jq -r '.version' -e < build_infos.json > /dev/null; then
|
|
||||||
echo -e "API returned an error"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
GEYSER_VERSION=$(jq -r '.version' < build_infos.json)
|
|
||||||
GEYSER_BUILD=$(jq -r '.build' < build_infos.json)
|
|
||||||
|
|
||||||
echo "Geyser verion $GEYSER_VERSION build #$GEYSER_BUILD"
|
|
||||||
|
|
||||||
DOWNLOAD_URL=$URL_BUILD'/downloads/standalone'
|
|
||||||
|
|
||||||
RUNNABLE_JAR='Geyser-'$GEYSER_VERSION'-'$GEYSER_BUILD'.jar'
|
|
||||||
|
|
||||||
echo "Downloadling Geyser Standalone..."
|
|
||||||
echo "From "$DOWNLOAD_URL
|
|
||||||
echo "To "$RUNNABLE_JAR
|
|
||||||
curl -L -o $RUNNABLE_JAR $DOWNLOAD_URL
|
|
||||||
|
|
||||||
|
|
||||||
DOCKER_TAG="cr.pandacube.fr/geyser:"$GEYSER_VERSION"-"$GEYSER_BUILD
|
|
||||||
DOCKER_TAG_LATEST="cr.pandacube.fr/geyser:latest"
|
|
||||||
echo "Building docker image of Geyser Standalone "$DOCKER_TAG
|
|
||||||
docker build --build-arg RUNNABLE_JAR=$RUNNABLE_JAR -t $DOCKER_TAG .
|
|
||||||
docker tag $DOCKER_TAG $DOCKER_TAG_LATEST
|
|
||||||
|
|
||||||
echo "Pushing image to Pandacube's container registry"
|
|
||||||
docker push $DOCKER_TAG
|
|
||||||
docker push $DOCKER_TAG_LATEST
|
|
Loading…
Reference in New Issue
Block a user