Fix build config
This commit is contained in:
parent
c337be1ce0
commit
2fb68ce8cf
|
@ -1,19 +1,25 @@
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- build-docker
|
- build-docker
|
||||||
|
|
||||||
build-static:
|
build-static:
|
||||||
image: mhart/alpine-node:latest
|
image: mhart/alpine-node:latest
|
||||||
|
stage: build
|
||||||
script:
|
script:
|
||||||
- npm install -g @vue/cli
|
- npm install -g @vue/cli
|
||||||
|
- cd joker
|
||||||
|
- npm run build
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- joker/dist
|
||||||
|
|
||||||
build-windows-amd64:
|
build-windows-amd64:
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- apk --no-cache add git
|
- apk --no-cache add git
|
||||||
- go get -d
|
- go get -d
|
||||||
- GOOS=windows go build -o joker.exe
|
- GOOS=windows go build -o joker.exe
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- joker.exe
|
- joker.exe
|
||||||
|
@ -22,9 +28,9 @@ build-linux-amd64:
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- apk --no-cache add git
|
- apk --no-cache add git
|
||||||
- go get -d
|
- go get -d
|
||||||
- GOOS=linux go build -o joker
|
- GOOS=linux go build -o joker
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- joker
|
- joker
|
||||||
|
@ -33,9 +39,9 @@ build-linux-arm:
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- apk --no-cache add git
|
- apk --no-cache add git
|
||||||
- go get -d
|
- go get -d
|
||||||
- GOARCH=arm GOOS=linux go build -o joker-arm
|
- GOARCH=arm GOOS=linux go build -o joker-arm
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- joker-arm
|
- joker-arm
|
||||||
|
@ -44,9 +50,9 @@ build-linux-arm64:
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- apk --no-cache add git
|
- apk --no-cache add git
|
||||||
- go get -d
|
- go get -d
|
||||||
- GOARCH=arm64 GOOS=linux go build -o joker-arm64
|
- GOARCH=arm64 GOOS=linux go build -o joker-arm64
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- joker-arm64
|
- joker-arm64
|
||||||
|
@ -55,29 +61,29 @@ build-docker-amd64:
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
stage: build-docker
|
stage: build-docker
|
||||||
script:
|
script:
|
||||||
- apk --no-cache add git
|
- apk --no-cache add git
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- 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 image build -t $CI_REGISTRY_IMAGE:amd64-latest -f docker/Dockerfile .
|
||||||
- docker push $CI_REGISTRY_IMAGE:amd64-latest
|
- docker push $CI_REGISTRY_IMAGE:amd64-latest
|
||||||
|
|
||||||
build-docker-arm:
|
build-docker-arm:
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
stage: build-docker
|
stage: build-docker
|
||||||
script:
|
script:
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
- mkdir tmp
|
- mkdir tmp
|
||||||
- wget -O tmp/qemu-arm-static https://github.com/multiarch/qemu-user-static/releases/download/v2.12.0/qemu-arm-static
|
- 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
|
- chmod +x tmp/qemu-arm-static
|
||||||
- docker image build -t $CI_REGISTRY_IMAGE:arm-latest -f docker/Dockerfile.arm .
|
- docker image build -t $CI_REGISTRY_IMAGE:arm-latest -f docker/Dockerfile.arm .
|
||||||
- docker push $CI_REGISTRY_IMAGE:arm-latest
|
- docker push $CI_REGISTRY_IMAGE:arm-latest
|
||||||
|
|
||||||
build-docker-arm64:
|
build-docker-arm64:
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
stage: build-docker
|
stage: build-docker
|
||||||
script:
|
script:
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
- mkdir tmp
|
- mkdir tmp
|
||||||
- wget -O tmp/qemu-aarch64-static https://github.com/multiarch/qemu-user-static/releases/download/v2.12.0/qemu-aarch64-static
|
- 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
|
- chmod +x tmp/qemu-aarch64-static
|
||||||
- docker image build -t $CI_REGISTRY_IMAGE:arm64-latest -f docker/Dockerfile.arm64 .
|
- docker image build -t $CI_REGISTRY_IMAGE:arm64-latest -f docker/Dockerfile.arm64 .
|
||||||
- docker push $CI_REGISTRY_IMAGE:arm64-latest
|
- docker push $CI_REGISTRY_IMAGE:arm64-latest
|
||||||
|
|
Loading…
Reference in New Issue