Gitlab Runner Docker on Ubuntu

Hello. I am fairly new to Gitlab runner. Followed this documentation and I set up CI/CD under settings. During registration, I declared the image as katalonstudio/katalon. I sudo installed and started. I created gitlab-ci.yml file. Once I ran the pipeline, I ended up getting an error: No/jobs or stages defined.

Here is my gitlab-ci.yml :

image: katalonstudio/katalon
services:

  • docker:dind

stages:

  • test

test_job:
stage: test
script:
- katalon-execute.sh -browserType=“Chrome” -retry=0 -statusDelay=15 -testSuitePath=“Test Suites/MyWebSite/Test Suites/TestSuite1” -executionProfile=“QA001”
artifacts:
name: “$CI_COMMIT_REF_NAME”
paths:
- report/
reports:
junit:
- ‘report/*.xml’
when: always
only:
variables:
- $SCHEDULE_JOB == “Smoke test”

Am I missing anything in this file? (I realized editor converted ‘-’ to bulletpoints. It should be -dockerdind and -test) Also, do I have to edit the environmental variables in ubuntu? Any thoughts will be a great help.

Hello @theautomater33,

I have got this sample.

image: katalonstudio/katalon
services:

  • docker:dind

before_script:

  • apt-get update >/dev/null
  • apt-get install -y locales >/dev/null
  • echo “en_US UTF-8” > /etc/locale.gen
  • locale-gen en_US.UTF-8
  • export LANG=en_US.UTF-8
  • export LANGUAGE=en_US:en
  • export LC_ALL=en_US.UTF-8

stages:

  • test

test_job:
stage: test

script:

- katalon-execute.sh -retry=0 -testSuitePath="Test Suites/xxxxxxxxxx" -executionProfile="xxxxxxx" -browserType="Chrome (headless)" -apiKey="xxxxxxxxxxxxxxxxx"

artifacts:
name: “$CI_COMMIT_REF_NAME”
paths:
- report/
reports:
junit:
- ‘report/*.xml’

1 Like

@theautomater33

Maybe your editor has been converted to invalid characters.
Just copy this sample file and add apiKey to run again.

1 Like

@duyluong Thanks for your help. After adding the apiKey in my script, it worked flawlessly.

1 Like