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

Persisting environment data between steps not working with debian base image #3593

Open
3 tasks done
micash545 opened this issue Apr 5, 2024 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working

Comments

@micash545
Copy link
Contributor

micash545 commented Apr 5, 2024

Component

server

Describe the bug

steps:
  - name: init
    image: debian
    commands:
      - echo "FOO=hello" >> envvars
      - echo "BAR=world" >> envvars

  - name: debug
    image: debian
    commands:
      - source envvars
      - echo $FOO

Output of debig step:

+ source envvars
/bin/sh: 15: source: not found

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"2.3.0"}

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
@micash545 micash545 added the bug Something isn't working label Apr 5, 2024
@zc-devs
Copy link
Contributor

zc-devs commented Apr 6, 2024

  1. Use POSIX . envvars;
  2. Or wait for Rework entrypoints #3269;
  3. Or try to wrap in script:
  - name: debug
    commands:
      - cicd/debug.sh
    image: debian
#!/bin/bash
source envvars
echo $FOO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants