How to pass values to a Gitlab CI Job

Hi Guys,

I have a GitLab ci job to download and build few files and then publish to another server. I have done a POC and was successful. The problem is that I would like to customize the job when triggered manually or via API. How can i pass the dynamic values(user given) to reflect in CI job (like a filename, format etc)?

I am using Windows runner.

I saw trigger variables and environment variables but can be retrieved while execution once the value is set in UI. I want a bit different where I will get the values from user.

Is it not possible in GitLab?

it is possible, I don’t know if it applies to Windows, but here is what I do to trigger another pipeline, which publishes my debian packages after all the packages are uploaded

.deploy:aptly: &deploy_aptly
    stage: deploy
    tags:
        - ubuntu_amd64
    script:
        - echo "=== deploy triggered by '${CI_PROJECT_PATH}' branch '${branch}'==="
        - ./aptly_deploy.sh --releases "${releases}" --branch "${branch}" ${clean_repo}
        - curl -X POST -F token=yourpersonaltokentotriggerotherpipeline -F ref=master -F "variables[TRIGGERED_BY]=${CI_PROJECT_PATH} ${branch}" https://gitlab.com/api/v4/projects/<yourprojectnumber>/trigger/pipeline

to configure a trigger (get the right path and token) go to your project to be triggered, go to settings - CI/CD - Pipeline triggers

Tigger documentation: https://gitlab.com/help/ci/triggers/README