Skip to content

Commit

Permalink
result annotation tail work.
Browse files Browse the repository at this point in the history
  • Loading branch information
slow-groovin committed Oct 21, 2024
1 parent 61ed5a4 commit bbf5606
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 12 additions & 0 deletions environment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ RUN echo $SECRETS1_TO_ENV

# let's see if bind env SECRET1_TO_ENV and run in one RUN command, can it be access?
RUN npm run print-var
# [script Print in Dockerfile]:
# VAR_IN_REPO : undefined
# SECRET_IN_REPO : undefined
# VAR_IN_JOB1 : undefined
# VAR_IN_STEP1 : undefined
# VAR_IN_RUN : undefined
# BUILD_ARG1 : <arg1 in build-args>
# SECRETS1 : undefined
# SECRET_ENV_1 : undefined
# VAR_IN_DOCKERFILE : <var in dockerfile>


RUN --mount=type=secret,id=SECRET_ENV_1,env=SECRET_ENV_1 \
npm run print-var
# the answer is: yes
Expand Down
4 changes: 0 additions & 4 deletions environment/printVarsByDockerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@ console.log('[script Print in Dockerfile]:')
envKeys.forEach(key=>{
console.log(key,":",process.env[key])
})
/*
result:
*/

0 comments on commit bbf5606

Please sign in to comment.