代码拉取完成,页面将自动刷新
同步操作将从 murphysecurity/murphysec 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
stages: # List of stages for jobs, and their order of execution
- build
- internal-pub
- notify
variables:
GOPROXY: https://goproxy.cn,direct
# GOPATH: "$CI_PROJECT_DIR/.go"
# GOBIN: "$CI_PROJECT_DIR/.go/bin"
CGO_ENABLED: '0'
# DENO_DIR: "$CI_PROJECT_DIR/.deno"
# GOCACHE: "$CI_PROJECT_DIR/.go-cache"
compose-build:
tags:
- client-build-shell
image: golang:1.19.2-bullseye
stage: build
artifacts:
expire_in: 1 day
paths:
- out/bin/*
# cache:
# key: cli-build-cache-v3
# paths:
# - .go/pkg/mod/
# - .go-cache/
before_script:
- mkdir -p .go-cache
- mkdir -p .go
rules:
- if: '$CI_COMMIT_TAG == null'
script:
- GOOS=windows GOARCH=amd64 go build -v -ldflags "-s -w -buildid=" -trimpath -o out/bin/murphysec-windows-amd64.exe .
- GOOS=windows GOARCH=arm64 go build -v -ldflags "-s -w -buildid=" -trimpath -o out/bin/murphysec-windows-arm64.exe .
- GOOS=linux GOARCH=amd64 go build -v -ldflags "-s -w -buildid=" -trimpath -o out/bin/murphysec-linux-amd64 .
- GOOS=linux GOARCH=arm64 go build -v -ldflags "-s -w -buildid=" -trimpath -o out/bin/murphysec-linux-arm64 .
- GOOS=darwin GOARCH=amd64 go build -v -ldflags "-s -w -buildid=" -trimpath -o out/bin/murphysec-darwin-amd64 .
- GOOS=darwin GOARCH=arm64 go build -v -ldflags "-s -w -buildid=" -trimpath -o out/bin/murphysec-darwin-arm64 .
compose-build-with-tag:
tags:
- client-build-shell
image: golang:1.19.2-bullseye
stage: build
artifacts:
expire_in: 1 day
paths:
- out/bin/*
# cache:
# key: cli-build-cache-v3
# paths:
# - .go/pkg/mod/
# - .go-cache/
before_script:
- mkdir -p .go-cache
- mkdir -p .go
rules:
- if: '$CI_COMMIT_TAG != null'
script:
- GOOS=windows GOARCH=amd64 go build -v -ldflags "-s -w -X github.com/murphysecurity/murphysec/infra/buildinfo.version=$CI_COMMIT_TAG -buildid=" -trimpath -o out/bin/murphysec-windows-amd64.exe .
- GOOS=windows GOARCH=arm64 go build -v -ldflags "-s -w -X github.com/murphysecurity/murphysec/infra/buildinfo.version=$CI_COMMIT_TAG -buildid=" -trimpath -o out/bin/murphysec-windows-arm64.exe .
- GOOS=linux GOARCH=amd64 go build -v -ldflags "-s -w -X github.com/murphysecurity/murphysec/infra/buildinfo.version=$CI_COMMIT_TAG -buildid=" -trimpath -o out/bin/murphysec-linux-amd64 .
- GOOS=linux GOARCH=arm64 go build -v -ldflags "-s -w -X github.com/murphysecurity/murphysec/infra/buildinfo.version=$CI_COMMIT_TAG -buildid=" -trimpath -o out/bin/murphysec-linux-arm64 .
- GOOS=darwin GOARCH=amd64 go build -v -ldflags "-s -w -X github.com/murphysecurity/murphysec/infra/buildinfo.version=$CI_COMMIT_TAG -buildid=" -trimpath -o out/bin/murphysec-darwin-amd64 .
- GOOS=darwin GOARCH=arm64 go build -v -ldflags "-s -w -X github.com/murphysecurity/murphysec/infra/buildinfo.version=$CI_COMMIT_TAG -buildid=" -trimpath -o out/bin/murphysec-darwin-arm64 .
internal-cos-upload:
image: iseki0/cos-uploader:v1.1.3
stage: internal-pub
artifacts:
expire_in: 1 day
paths:
- out/zip/*
script:
- mkdir out/zip
- bash -c "cd out/bin/ && zip ../zip/pro.zip *"
- cos-uploader --local out/bin/murphysec-windows-amd64.exe --remote /client/$CI_BUILD_REF_NAME/murphysec-windows-amd64.exe
- cos-uploader --local out/bin/murphysec-windows-arm64.exe --remote /client/$CI_BUILD_REF_NAME/murphysec-windows-arm64.exe
- cos-uploader --local out/bin/murphysec-linux-amd64 --remote /client/$CI_BUILD_REF_NAME/murphysec-linux-amd64
- cos-uploader --local out/bin/murphysec-linux-arm64 --remote /client/$CI_BUILD_REF_NAME/murphysec-linux-arm64
- cos-uploader --local out/bin/murphysec-darwin-amd64 --remote /client/$CI_BUILD_REF_NAME/murphysec-darwin-amd64
- cos-uploader --local out/bin/murphysec-darwin-arm64 --remote /client/$CI_BUILD_REF_NAME/murphysec-darwin-arm64
- cos-uploader --local out/zip/pro.zip --remote /client/$CI_BUILD_REF_NAME/pro.zip
- cos-uploader --local out/bin/murphysec-windows-amd64.exe --remote /client/-/murphysec-windows-amd64.exe
- cos-uploader --local out/bin/murphysec-windows-arm64.exe --remote /client/-/murphysec-windows-arm64.exe
- cos-uploader --local out/bin/murphysec-linux-amd64 --remote /client/-/murphysec-linux-amd64
- cos-uploader --local out/bin/murphysec-linux-arm64 --remote /client/-/murphysec-linux-arm64
- cos-uploader --local out/bin/murphysec-darwin-amd64 --remote /client/-/murphysec-darwin-amd64
- cos-uploader --local out/bin/murphysec-darwin-arm64 --remote /client/-/murphysec-darwin-arm64
- cos-uploader --local out/zip/pro.zip --remote /client/-/pro.zip
lark-notify:
image: denoland/deno
stage: notify
cache:
key: cli-deno-cache-1223
paths:
- .deno
script:
- deno run --allow-all ci/lark-push.ts
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。