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

enhance: clarify environment usage #371

Merged
merged 2 commits into from
Aug 2, 2023
Merged

Conversation

jnguyen886
Copy link
Contributor

Update environment.md to be more consistent with actual experience. Environment variables are not automatically capitalized, unlike secrets.

Update environment.md to be more consistent with actual experience. Environment variables are not automatically capitalized, unlike secrets.
@jnguyen886 jnguyen886 requested a review from a team as a code owner July 26, 2023 14:10
@ecrupper
Copy link
Contributor

ecrupper commented Aug 2, 2023

Thanks! Can you change this part:

  goodbye:
    steps:
      - name: String Operation
        image: alpine
        environment:
          goodbye_message: Goodbye, World!
        commands:
          # This ":0:8" shorthand will cut the value of the commit
          # down to just the first 0 through 8 characters of the sha.
          - echo ${VELA_BUILD_COMMIT:0:8} 
          - echo ${GOODBYE_MESSAGE}  

to be the other side of the coin:

  goodbye:
    steps:
      - name: String Operation
        image: alpine
        environment:
          goodbye_message: Goodbye, World!
        commands:
          # This ":0:8" shorthand will cut the value of the commit
          # down to just the first 0 through 8 characters of the sha.
          - echo ${VELA_BUILD_COMMIT:0:8} 
          - echo ${goodbye_message}  

That way we can see that lowercase does indeed work, but it must be consistent when using it in the container 👍

case persists for lower and upper for environment variable
@jnguyen886
Copy link
Contributor Author

Thanks! Can you change this part:

  goodbye:
    steps:
      - name: String Operation
        image: alpine
        environment:
          goodbye_message: Goodbye, World!
        commands:
          # This ":0:8" shorthand will cut the value of the commit
          # down to just the first 0 through 8 characters of the sha.
          - echo ${VELA_BUILD_COMMIT:0:8} 
          - echo ${GOODBYE_MESSAGE}  

to be the other side of the coin:

  goodbye:
    steps:
      - name: String Operation
        image: alpine
        environment:
          goodbye_message: Goodbye, World!
        commands:
          # This ":0:8" shorthand will cut the value of the commit
          # down to just the first 0 through 8 characters of the sha.
          - echo ${VELA_BUILD_COMMIT:0:8} 
          - echo ${goodbye_message}  

That way we can see that lowercase does indeed work, but it must be consistent when using it in the container 👍

Whoops, missed that part. Thanks! Changes updated.

@wass3rw3rk wass3rw3rk changed the title Update environment.md enhance: clarify environment usage Aug 2, 2023
@wass3rw3rk wass3rw3rk merged commit 0597184 into go-vela:main Aug 2, 2023
@jnguyen886 jnguyen886 deleted the patch-1 branch August 2, 2023 17:33
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

Successfully merging this pull request may close these issues.

3 participants