blob: ea36c8085e89deae3eb0ce19ba038c405954b483 (
plain) (
tree)
|
|
stages:
- test
- build
- deploy
# --- globals -----------------------------------------------------------------
variables:
CROSS: i686-w64-mingw32.shared
MP_REPOSITORY: https://gitlab.com/jak89_1/manaplus.git
.job-deploy: &job-deploy
artifacts:
paths:
- build
- logs
- public
when: always
expire_in: 3 week
.job-build: &job-build
artifacts:
paths:
- build
- logs
when: always
expire_in: 3 week
.job-test: &job-test
artifacts:
paths:
- logs
when: always
expire_in: 3 week
# --- jobs --------------------------------------------------------------------
mxe_gcc5:
image: $CI_REGISTRY_IMAGE:v1.0.4
stage: build
except:
- /^test.*/
- /^registry.*/
script:
- cd /
- mkdir -p "${CI_PROJECT_DIR}/logs/" || true
- mkdir -p "${CI_PROJECT_DIR}/build/" || true
- git clone $CI_REPOSITORY_URL -b $CI_COMMIT_BRANCH /opt || exit 1
- rm -rf /opt/.git/
- mv -f opt/* /
- git clone $MP_REPOSITORY -b master || exit 1
- chmod +x ./manaplus.sh && ./manaplus.sh
<<: *job-build
tags:
- docker
pages:
image: alpine
stage: deploy
only:
- stable
- release
before_script:
- apk add openssh-client libxml2-utils jsonlint
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- echo "${SSH_PRIVATE_KEY_BASE64}" | base64 -d | tr -d '\r' > ~/.ssh/id_rsa
- chmod -R 700 ~/.ssh
script:
- echo "[WIP] mirror"
- ./pages.sh
- rm -rf ~/.ssh
<<: *job-deploy
allow_failure: true
registry_deploy:
image: alpine
stage: deploy
only:
- /^registry_.*/
- /^registry/.*/
script:
- echo "[WIP]"
- exit 1
<<: *job-test
allow_failure: true
test_only:
image: alpine
stage: test
only:
- /^test_.*/
- /^test/.*/
script:
- echo "ci testing should use branches named test_* (doesnt trigger mxe_gcc5 build)"
<<: *job-test
allow_failure: true
|