Giter Site home page Giter Site logo

Comments (2)

sh-cau avatar sh-cau commented on June 8, 2024 1

The actual gitlab runner is registered using gitlab-runner register --docker-mac-address AA:BB:CC:DD:EE:FF ..., which writes the mac address in the config.toml of the gitlab runner much like described in your second reference. Unfortunately, gitlab-runner exec ignores this configuration entirely (but it doesn't when its being called by GitLab).

You solution works, however, this requires me to adjust the .gitlab-ci.yaml everytime I want to test locally and this, in fact, is the reason I quit using gitlab-runner exec because with that you can't pass CI-specific environment variables, say, CI_JOB_TOKEN or CI_PIPELINE_SOURCE, which also leads to me having to rename these variables for the testing time.

from gitlab-ci-local.

ANGkeith avatar ANGkeith commented on June 8, 2024

We can add support for this, but my question is how do you then, plan to run this via the actual gitlab runnner ?

Maybe you can give the following a try?

#.gitlab-ci.yml
job:
  image: bash
  script:
    - ifconfig eth0 hw ether "AA:BB:CC:DD:EE:FF"
    - ip a show eth0

image

Addtional info:
Until https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27863 is implemented, you might want to go with the hacky workaround as recommended here https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2344#note_95853536

from gitlab-ci-local.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.