Commit 73821b8e authored by nanahira's avatar nanahira

pack

parent acb5df9f
Pipeline #2002 failed with stages
in 3 minutes and 58 seconds
......@@ -7,21 +7,37 @@ variables:
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
build:
docker:
stage: build
tags:
- docker
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build --pull -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
pack:
stage: build
image: node:buster-slim
tags:
- linux
dependencies: []
artifacts:
paths:
- dist/
script:
- apt update && apt -y install python3 build-essential
- npm ci
- npm run build
- npm run pack
deploy_latest:
stage: deploy
tags:
- docker
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
......@@ -35,6 +51,8 @@ deploy_tag:
- docker
variables:
CONTAINER_TAG_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_TAG_IMAGE
......
This diff is collapsed.
......@@ -4,9 +4,17 @@
"description": "Offers money to a specific account",
"main": "build/run.js",
"scripts": {
"pack": "mkdir dist ; ./node_modules/.bin/pkg --out-path dist .",
"build": "tsc",
"test": "node build/run.js Irrlicht"
},
"bin": "build/run.js",
"pkg": {
"scripts": [
"build/*.js"
],
"assets": []
},
"repository": {
"type": "git",
"url": "https://code.mycard.moe/nanahira/wolfx-money"
......@@ -18,6 +26,7 @@
"@types/q": "^1.5.4",
"@types/underscore": "^1.10.24",
"mineflayer": "^2.40.1",
"pkg": "^4.4.9",
"q": "^1.5.1",
"typescript": "^4.1.3",
"underscore": "^1.12.0"
......
#!/bin/bash
# curl https://water.mycard.moe:9000/nanahira/wolfx/run.sh | sudo bash -
apt-get update
apt-get -y install docker.io python3-pip
/usr/bin/pip3 install -U pip
/usr/local/bin/pip install -U docker-compose
wget -O docker-compose.yml https://water.mycard.moe:9000/nanahira/wolfx/docker-compose-china.yml
docker-compose up
version: '2.2'
services:
wolfx:
image: git-registry.mycard.moe/nanahira/wolfxmc-money
scale: 10
environment:
USERNAME: irrlicht
version: '2'
version: '2.2'
services:
wolfx:
image: nanahira/wolfx-money
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment