Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables defined in Manifest cannot be override #58

Open
rhuiser opened this issue Jul 3, 2018 · 1 comment
Open

Environment variables defined in Manifest cannot be override #58

rhuiser opened this issue Jul 3, 2018 · 1 comment

Comments

@rhuiser
Copy link

rhuiser commented Jul 3, 2018

It is good practice to set default values for environment variables in the Manifest and only deploy time override those which require change.

While new variables are added to the deployment, the Manifest (default) values remain the same.

See pipeline snippet used where I set a new variable (version) and try to override the eureka client to false.

- name: my-app
  public: false
  serial: true
  plan:
  - get: my-app-deployment
  - get: my-app-release
  - put: cf-deploy
    params:
      manifest: my-app-deployment/cloudfoundry/manifest.yml
      path: my-app-release/my-component-((my-version)).jar
      current_app_name: my-app
      environment_variables:
         version: ((my-version)
         eureka.client.enabled: 'false'

manifest.yml

---
applications:
  - name: my-app
    instances: 1
    buildpack: https://github.com/cloudfoundry/java-buildpack#v4.2
    path: ./my-app.jar
    memory: 1024M
    disk_quota: 256M
    stack: cflinuxfs2
    no-route: true
    env:
       eureka.client.enabled: true

Now, when I inspect the app env after deployment...

$ cf env my-app
<...>
User-Provided:
eureka.client.enabled: true
version: 0.0.3
@juangcarmona
Copy link

Hey!

If we can't override values in the manifest or add env variables in our pipelines then this is useless, the entire artifact. When are you planning to work on this? We tried environment_variables, vars, and vars_files and none of them worked at all.

Please, at least give us some feedback.

Regards,

Juan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants