我想将之前工作中的工件设置为发布中的资产,但据说release-cli未能向gitlab url发出请求。我该如何解决这个问题? 为什么我收到这个错误? 这是我收到的错误:
release-cli --insecure-https create --name="$VERSION" --description "$CI_COMMIT_TAG_MESSAGE" --tag-name="$VERSION" --assets-link='{"name":"docker_image.zip","url":"'$GE_JOB_URL'/artifacts/download?file_type=archive"}'
time="2023-09-01T13:14:03Z" level=info msg="Creating Release..." cli=release-cli command=create name= project-id=48 ref=7...02 server-url="http://<gitlab_url>" tag-message= tag-name= version=0.15.0
time="2023-09-01T13:14:34Z" level=fatal msg="run app" cli=release-cli error="failed to create release: failed to do request: Post \"http://<gitlab_url>/api/v4/projects/48/releases\": dial tcp <some IP with port>: i/o timeout" version=0.15.0
这是gitlab yml文件中的代码:
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
needs:
- job: build:image
artifacts: true
rules:
- if: $CI_COMMIT_TAG
- when: always
script:
- echo "running release_job"
- echo 'Previous Job ID is printed below'
- echo $GE_JOB_ID
- echo $GE_JOB_URL
- release-cli --insecure-https create --name="$VERSION" --description "$CI_COMMIT_TAG_MESSAGE" --tag-name="$VERSION" --assets-link='{"name":"docker_image.zip","url":"'$GE_JOB_URL'/artifacts/download?file_type=archive"}'