update ci config
This commit is contained in:
parent
5335755b91
commit
aa206d25eb
@ -9,13 +9,11 @@ variables:
|
|||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
- deploy
|
||||||
- release
|
- release
|
||||||
|
|
||||||
cache: # 缓存
|
|
||||||
paths:
|
|
||||||
- bin
|
|
||||||
|
|
||||||
job_build:
|
bin_build:
|
||||||
stage: build
|
stage: build
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
script:
|
script:
|
||||||
@ -24,12 +22,14 @@ job_build:
|
|||||||
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${LINUX_AMD64_BINARY} "${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}"
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${LINUX_AMD64_BINARY} "${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}"
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- bin
|
- .
|
||||||
|
|
||||||
|
docker_build:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- docker build -t console:${PACKAGE_VERSION} .
|
||||||
|
|
||||||
release:
|
release:
|
||||||
# Caution, as of 2021-02-02 these assets links require a login, see:
|
|
||||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/299384
|
|
||||||
stage: release
|
stage: release
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
script:
|
script:
|
||||||
@ -37,4 +37,8 @@ release:
|
|||||||
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
|
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
|
||||||
--assets-link "{\"name\":\"${LINUX_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}\"}"
|
--assets-link "{\"name\":\"${LINUX_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}\"}"
|
||||||
|
|
||||||
|
docker_deploy:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- docker tag console:${PACKAGE_VERSION} reg.sre.victor-core.top/cobalt-strike/REPOSITORY:${PACKAGE_VERSION}
|
||||||
|
- docker push reg.sre.victor-core.top/cobalt-strike/REPOSITORY:${PACKAGE_VERSION}
|
Loading…
x
Reference in New Issue
Block a user