joker/.gitlab-ci.yml

91 lines
2.1 KiB
YAML

stages:
- build
- build-docker
build-static:
image: mhart/alpine-node:latest
stage: build
script:
- npm install -g @vue/cli
- export PATH=$PATH:node_modules/.bin
- cd joker
- npm run build
artifacts:
paths:
- joker/dist
build-windows-amd64:
image: golang:alpine
stage: build
script:
- apk --no-cache add git
- go get -d
- GOOS=windows go build -o joker.exe
artifacts:
paths:
- joker.exe
build-linux-amd64:
image: golang:alpine
stage: build
script:
- apk --no-cache add git
- go get -d
- GOOS=linux go build -o joker
artifacts:
paths:
- joker
build-linux-arm:
image: golang:alpine
stage: build
script:
- apk --no-cache add git
- go get -d
- GOARCH=arm GOOS=linux go build -o joker-arm
artifacts:
paths:
- joker-arm
build-linux-arm64:
image: golang:alpine
stage: build
script:
- apk --no-cache add git
- go get -d
- GOARCH=arm64 GOOS=linux go build -o joker-arm64
artifacts:
paths:
- joker-arm64
build-docker-amd64:
image: docker:latest
stage: build-docker
script:
- apk --no-cache add git
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker image build -t $CI_REGISTRY_IMAGE:amd64-latest -f docker/Dockerfile .
- docker push $CI_REGISTRY_IMAGE:amd64-latest
build-docker-arm:
image: docker:latest
stage: build-docker
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- mkdir tmp
- wget -O tmp/qemu-arm-static https://github.com/multiarch/qemu-user-static/releases/download/v2.12.0/qemu-arm-static
- chmod +x tmp/qemu-arm-static
- docker image build -t $CI_REGISTRY_IMAGE:arm-latest -f docker/Dockerfile.arm .
- docker push $CI_REGISTRY_IMAGE:arm-latest
build-docker-arm64:
image: docker:latest
stage: build-docker
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- mkdir tmp
- wget -O tmp/qemu-aarch64-static https://github.com/multiarch/qemu-user-static/releases/download/v2.12.0/qemu-aarch64-static
- chmod +x tmp/qemu-aarch64-static
- docker image build -t $CI_REGISTRY_IMAGE:arm64-latest -f docker/Dockerfile.arm64 .
- docker push $CI_REGISTRY_IMAGE:arm64-latest