8000 DEV-510: Fix availability of CI env var on remote executions by ifbyol · Pull Request #4545 · okteto/okteto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DEV-510: Fix availability of CI env var on remote executions #4545

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

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/remote/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ WORKDIR /okteto/src
ENV {{$key}}={{$val}}
{{end}}
{{range $key, $val := .OktetoCommandSpecificEnvVars }}
ARG {{$key}} {{$val}}
ENV {{$key}}={{$val}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARG {{$key}}={{$val}} also works. The main difference between ARG and ENV is that you can change the value of ARG for different builds. Since we autogenerate these dockerfiles, instead of passing ARG values for the same dockerfile, both options are equivalent.

{{end}}
{{range $key, $val := .OktetoDependencyEnvVars }}
ENV {{$key}}={{$val}}
Expand Down
4 changes: 2 additions & 2 deletions pkg/remote/remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ ENV OKTETO_BUILD_SVC2_IMAGE="TWO_VALUE"
ENV OKTETO_BUIL_SVC_IMAGE="ONE_VALUE"


ARG OKTETO_IS_PREVIEW_ENVIRONMENT true
ENV OKTETO_IS_PREVIEW_ENVIRONMENT=true


ENV OKTETO_DEPENDENCY_DATABASE_VARIABLE_PASSWORD="dependency_pass"
Expand Down Expand Up @@ -408,7 +408,7 @@ ENV OKTETO_BUILD_SVC2_IMAGE="TWO_VALUE"
ENV OKTETO_BUIL_SVC_IMAGE="ONE_VALUE"


ARG CI true
ENV CI=true


ENV OKTETO_DEPENDENCY_DATABASE_VARIABLE_PASSWORD="dependency_pass"
Expand Down
Loading
0