mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
auto-generated docker image for server-cli based on kaniko like i researched for torvus and correct release branch detection:
- ade4d37575
This commit is contained in:
parent
21291739e5
commit
1fbdb9c590
@ -8,7 +8,8 @@ variables:
|
||||
stages:
|
||||
- optional-builds
|
||||
- check-compile
|
||||
- post
|
||||
- build-post
|
||||
- publish
|
||||
|
||||
before_script:
|
||||
- source $HOME/.cargo/env
|
||||
@ -90,10 +91,10 @@ security:
|
||||
|
||||
# --
|
||||
|
||||
# -- post build
|
||||
# -- build-post
|
||||
|
||||
unittests:
|
||||
stage: post
|
||||
stage: build-post
|
||||
when: delayed
|
||||
start_in: 5 seconds
|
||||
tags:
|
||||
@ -103,7 +104,7 @@ unittests:
|
||||
- cargo test || cargo test || cargo test || cargo test
|
||||
|
||||
coverage:
|
||||
stage: post
|
||||
stage: build-post
|
||||
when: delayed
|
||||
start_in: 5 seconds
|
||||
tags:
|
||||
@ -113,7 +114,7 @@ coverage:
|
||||
- cargo tarpaulin -v || cargo tarpaulin -v || cargo tarpaulin -v || cargo tarpaulin -v || cargo tarpaulin -v || cargo tarpaulin -v || cargo tarpaulin -v || cargo tarpaulin -v || cargo tarpaulin -v || cargo tarpaulin -v
|
||||
|
||||
benchmarks:
|
||||
stage: post
|
||||
stage: build-post
|
||||
when: delayed
|
||||
start_in: 5 seconds
|
||||
tags:
|
||||
@ -125,7 +126,7 @@ benchmarks:
|
||||
localization-status:
|
||||
variables:
|
||||
GIT_DEPTH: 0
|
||||
stage: post
|
||||
stage: build-post
|
||||
when: delayed
|
||||
start_in: 5 seconds
|
||||
allow_failure: true
|
||||
@ -135,14 +136,15 @@ localization-status:
|
||||
- cargo test -q test_all_localizations -- --nocapture --ignored
|
||||
|
||||
linux:
|
||||
stage: post
|
||||
stage: build-post
|
||||
when: delayed
|
||||
start_in: 5 seconds
|
||||
only:
|
||||
refs:
|
||||
- /^r[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- /^v[0-9]+\.[0-9]+/
|
||||
- /^master$/
|
||||
- /^docker-server$/
|
||||
tags:
|
||||
- veloren-docker
|
||||
script:
|
||||
@ -160,13 +162,13 @@ linux:
|
||||
expire_in: 1 week
|
||||
|
||||
windows:
|
||||
stage: post
|
||||
stage: build-post
|
||||
when: delayed
|
||||
start_in: 5 seconds
|
||||
only:
|
||||
refs:
|
||||
- /^r[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- /^v[0-9]+\.[0-9]+/
|
||||
- /^master$/
|
||||
tags:
|
||||
- veloren-docker
|
||||
@ -182,3 +184,30 @@ windows:
|
||||
- LICENSE
|
||||
expire_in: 1 week
|
||||
# --
|
||||
|
||||
# -- publish
|
||||
|
||||
docker:
|
||||
stage: publish
|
||||
when: delayed
|
||||
start_in: 5 seconds
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
dependencies:
|
||||
- linux
|
||||
before_script:
|
||||
- ls "$CI_PROJECT_DIR/server-cli/"
|
||||
only:
|
||||
refs:
|
||||
- /^r[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- /^v[0-9]+\.[0-9]+/
|
||||
- /^master$/
|
||||
- /^docker-server$/
|
||||
tags:
|
||||
- veloren-docker
|
||||
script:
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/server-cli/Dockerfile --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-server"
|
||||
|
||||
# --
|
||||
|
8
server-cli/Dockerfile
Normal file
8
server-cli/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM debian:stable-slim
|
||||
|
||||
ARG PROJECTNAME=server-cli
|
||||
|
||||
COPY ./server-cli/docker-run.sh /opt/docker-run.sh
|
||||
COPY ./veloren-server-cli /opt/veloren-server-cli
|
||||
COPY ./assets/common /opt/assets/common
|
||||
COPY ./assets/world /opt/assets/world
|
17
server-cli/docker-compose.yml
Normal file
17
server-cli/docker-compose.yml
Normal file
@ -0,0 +1,17 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
game-server:
|
||||
image: registry.gitlab.com/veloren/veloren:master-server
|
||||
ports:
|
||||
- "14004:14004"
|
||||
- "14005:14005"
|
||||
deploy:
|
||||
replicas: 1
|
||||
update_config:
|
||||
parallelism: 2
|
||||
delay: 10s
|
||||
order: stop-first
|
||||
failure_action: rollback
|
||||
restart_policy:
|
||||
condition: on-failure
|
3
server-cli/docker-run.sh
Executable file
3
server-cli/docker-run.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /opt
|
||||
RUST_LOG=info,common=debug,common::net=info RUST_BACKTRACE=1 /opt/veloren-server-cli
|
Loading…
Reference in New Issue
Block a user