|
|
|
|
|
by Matt3o12_
3105 days ago
|
|
But how do you tell a spell script to be a multi staged build? You can't just write `set OS=macos` and suddenly your OS changes from debian to macos. The best you could do is to ssh into that machine but how do you tell your build system to provision a machine with such parameters? You would essential have to build a new build system just for that. Or you could just use a config file -- whether you call it config.ini, .gitlab-ci.yaml, or build.json should not matter. Furthermore, how would you execute a bash script on Windows? You would have to at least tell it to enable Linux Subsystem and make sure it is a Pro version. I personally don't like to have a whole shell script inside .gitlab-ci.yaml file either -- that's why I have a seperate script called setup.bash/build.bash inside a CI folder and juse write `script: ./ci/build.bash` inside gitlab-ci.yaml. But nobody ever told you, you cannot do that. The gitlab-ci.yml is just a configuration file for the build system to tell it what you want your environment(s) to be. I agree that error reporting for YAML files suck -- but at least they are more consistent and easier to parse then XML files. And they are also way more readable then JSON files -- they have essential features such as long strings, and comments. The only annoying thing with Gitlab CI (and any other CI system) is to make sure it works. It often takes me 10 tries to make sure everything works correctly. |
|
"just write `script: ./ci/build.bash` inside gitlab-ci.yaml"
Yup. Then why have the YAML?
I said shell script, not bash. The first "CI/CD" (as the kids now call it) I ever did was on Windows. Worked great.