-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run this via Gitlab CI/CD using docker executor runner #17
Comments
The entrypoint of such an image is probably set to be a shell of some sort. The entrypoint of amake/innosetup is the InnoSetup executable (iscc); thus the result of If you want to run a shell, specify the entrypoint to be e.g. % docker run -it --rm --entrypoint /bin/bash amake/innosetup
xclient@8c35f8675f70:/work$
I've never used a Docker image in CI in "interactive mode". I think you are barking up the wrong tree. I don't know anything about Gitlab's CI so I can't give any specific advice, but I don't think you wan to run your job/task "in" amake/innosetup; in other words you shouldn't specify amake/innosetup for your job's |
Thanks for some useful insights. Using docker executor in gitlab-runner only works if the default entrypoint is a shell. For this particular case, since it is not a shell, I have changed to shell executor for my gitlab-runner meaning it will simply start a shell on the VM where the Gitlab-runner is installed.
The above seems to work and generate a setup for my application. I also had to make sure gitlab-runner is added to docker group to ensure it has privilleges to run docker command:
Hope this is helpful for someone else :) |
Although there is still one issue: When a directory
So when I try to run a JOB for a second time, it fails the clean up old job artifacts:
I am now trying to understand whether that is an issue from the gitlab-runner or the Create_install.iss side. |
Had the Same Issue and Fixed it – Here is my Pipeline:
image:
name: amake/innosetup
entrypoint: [""] Then you can use Full Stage:innosetup:
stage: package
image:
name: amake/innosetup
entrypoint: [""]
tags:
- innosetup
script:
- mkdir -p ./Output
- echo "Current directory $(pwd)"
- echo "Contents of directory:"
- ls -la
- echo "Checking if myscript.iss exists..."
- if [ ! -f myscript.iss ]; then echo "myscript.iss not found!"; exit 1; fi
- iscc myscript.iss
dependencies:
- sign
artifacts:
paths:
- ./Output/ Censored Pipeline OutputRunning with gitlab-runner 17.1.0 (fe451d5a)
on my-gitlabrunner **********, system ID: **********
Preparing the "docker" executor
00:02
Using Docker executor with image amake/innosetup ...
Pulling docker image amake/innosetup ...
Using docker image sha256:********** for amake/innosetup with digest amake/innosetup@sha256:********** ...
Preparing environment
00:01
Running on runner-**********-project-***-concurrent-0 via my-gitlabrunner...
Getting source from Git repository
00:01
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/**********/**********/**********/.git/
Checking out ********** as detached HEAD (ref is main)...
Removing codeSignCert.pfx
Removing publish/
Skipping Git submodules setup
Downloading artifacts
00:01
Downloading artifacts for sign (****)...
Downloading artifacts from coordinator... ok host=********** id=**** responseStatus=200 OK token=**********
Executing "step_script" stage of the job script
00:10
Using docker image sha256:********** for amake/innosetup with digest amake/innosetup@sha256:********** ...
$ mkdir -p ./Output
$ if [ ! -f myscript.iss ]; then echo "myscript.iss not found!"; exit 1; fi
$ iscc myscript.iss
Inno Setup 6 Command-Line Compiler
Copyright (C) 1997-2024 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2024 Martijn Laan. All rights reserved.
Portions Copyright (C) 2001-2004 Alex Yackimoff. All rights reserved.
https://www.innosetup.com
Compiler engine version: Inno Setup 6.3.3
Preprocessing
Reading file: C:\Program Files\Inno Setup 6\ISPPBuiltins.iss
Parsing [Setup] section, line 2
Parsing [Setup] section, line 3
Parsing [Setup] section, line 4
Parsing [Setup] section, line 5
Parsing [Setup] section, line 6
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Reading file (WizardImageFile)
Reading file (WizardSmallImageFile)
Preparing Setup program executable
Updating version info (SETUP.E32)
Determining language code pages
Reading file: C:\Program Files\Inno Setup 6\Default.isl
Messages in script file
Reading default messages from Default.isl
Parsing [LangOptions], [Messages], and [CustomMessages] sections
Reading file: C:\Program Files\Inno Setup 6\Default.isl
Messages in script file
Reading [Code] section
Parsing [Icons] section, line 14
Parsing [Files] section, line 11
Creating setup files
Compressing: **********\**********\**********\publish\my-csharp-service.exe
Compressing Setup program executable
Updating version info (SETUP.EXE)
Updating manifest (SETUP.EXE)
Warning: Constant "pf" has been renamed. Use "commonpf" instead or consider using its "auto" form.
Successful compile (1.945 sec). Resulting Setup program filename is:
**********\**********\**********\Output\MyProgramSetup.exe
Uploading artifacts for successful job
00:01
Uploading artifacts...
./Output/: found 2 matching artifact files and directories
Uploading artifacts as "archive" to coordinator... 201 Created id=**** responseStatus=201 Created token=**********
Cleaning up project directory and file based variables
00:00
Job succeeded |
Hello. I am quite new at docker. I have previously used some docker images. Normally, I run the docker image using --it flag which allows me to wander inside the docker container and see what is going on there. See example of interactive mode that I use for another docker image:
I have noticed that amake/innosetup docker image does not allow that. For some reason it automatically kicks me out of the docker container after it is run:
I have found a way how to generate a setup if I run the docker via my server VM:
I am now trying to find a way how to generate setup using Gitlab CI/CD. I tried to use docker executor but since it does not have interactive mode I dont think this is possible? I tried the following CI/CD script:
But I get the following error:
I would very much appreciate if someone could shed some light on how I can use this docker image with gitlab-runner with docker executor to generate setup for my project.
The text was updated successfully, but these errors were encountered: