Quantcast
Channel: CircleCI Discuss - Latest posts
Viewing all articles
Browse latest Browse all 14890

Running additional containers for Orb job

$
0
0

So if the environment variable is passed as String and using the VAR=value syntax it seems I can do something like the following.

workflows:
  version: 2

  test:
    jobs:
      - my_orb/test:
          executor:
            name: my_orb/executor
            environment: >
              DATABASE_URL=mysql://root@localhost/sample_app
            extra-image: mysql:5.7
            extra-image-environment: >
              MYSQL_DATABASE='sample_app'
              MYSQL_ALLOW_EMPTY_PASSWORD='yes'

But it is creating a ad-hoc syntax hard to follow.

In my current case the base executor is only defining the docker image so it is not big deal to duplicate that. Since the docker stanza is dropped if another image is mentioned when using the orb executor, then there is no gain to use it.

Regarding the extending jobs story, the difference is that the pre/post step can only be used inside the workflows jobs. If I want to use the orb job + a pre-step multiple times with different orb job parameters I would prefer to define a custom inline job extending the orb job with the pre-step and invoke multiple time the custom inline job. That can’t be done and I am forced to include the pre-step in even invocation of the orb job.

The orb job is bigger than the executor so it is not an option to copy its content to the inline job.

So I am failing to take some advantage of the orbs when facing the need to extending the need with additional services.


Viewing all articles
Browse latest Browse all 14890

Latest Images

Trending Articles



Latest Images