如何解决在gitlab ci阶段构建安装程序
在gitlab ci中,我设法构建一个解决方案,然后需要构建一个安装程序。它失败,并出现未知的选项错误。
在设置阶段,我会收到此错误:
Inno Setup 6命令行编译器
(C)1997-2020 Jordan Russell版权所有。保留所有权利。
部分版权所有(C)2000-2020 Martijn Laan。保留所有权利。
部分版权所有(C)2001-2004 Alex Yackimoff。保留所有权利。
未知选项:-c
未知选项:-c
Inno Setup 6命令行编译器
版权所有(C)1997-2020 Jordan Russell。保留所有权利。
部分版权所有(C)2000-2020 Martijn Laan。保留所有权利。
部分版权所有(C)2001-2004 Alex Yackimoff。保留所有权利。
错误:作业失败:退出代码1
这是我的.gitlab-ci.yml文件:
stages:
- build
- setup
build:
image: mono:latest
stage: build
script:
- 'nuget restore'
- 'MONO_IOMAP=case msbuild /t:Build /p:Configuration=Release;Platform="Any CPU"'
artifacts:
paths:
- MyApp/bin/Release/
- MyApp/Inno/
setup:
image: amake/innosetup
stage: setup
script:
- 'compil32 /cc "Path/To/MyAppSetup.iss"'
#- 'iscc "Path/To/MyAppSetup.iss"'
- 我使用正确的innosetup命令(compil32)吗?
- iscc命令出现相同错误
- 我看不到 -c 选项的来源
- 有什么想法要解决吗?
解决方法
由于我不知道问题出在哪里,所以我决定将docker映像用于innosetup:
我需要在 docker 步骤中使用dind
和docker docker。
build:
stage: build
image: docker:18
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
script:
- docker run --rm -v "$PWD:/work" amake/innosetup /dMyAppVersion=$MY_VERSION_NO "Path/To/MyAppSetup.iss"
artifacts:
paths:
- Path/To/bin/MyApp-*-Setup.exe
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。