fixing handling of secrets
This commit is contained in:
parent
52275b09a7
commit
e37b31d28c
@ -6,4 +6,8 @@ steps:
|
|||||||
- name: build
|
- name: build
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
commands:
|
commands:
|
||||||
- docker build . --build-arg USER=$USER --build-arg TOKEN=$TOKEN
|
- mkdir .secret
|
||||||
|
- echo "$USER" > .secret/user
|
||||||
|
- echo "$TOKEN" > .secret/token
|
||||||
|
- DOCKER_BUILDKIT=1 docker build . --secret id=user,src=.secret/user --secret id=token,src=.secret/token
|
||||||
|
- rm -rf .secret
|
||||||
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.secret
|
11
Dockerfile
11
Dockerfile
@ -1,4 +1,6 @@
|
|||||||
from ubuntu:latest
|
# syntax = docker/dockerfile:1.0-experimental
|
||||||
|
|
||||||
|
FROM ubuntu:latest
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
||||||
@ -71,10 +73,9 @@ RUN make
|
|||||||
RUN cp prdbase prspice /opt/cad/bin
|
RUN cp prdbase prspice /opt/cad/bin
|
||||||
|
|
||||||
# install ACT-06
|
# install ACT-06
|
||||||
ARG USER
|
RUN apt-get install -y libedit-dev zlib1g-dev m4 git gcc g++ make
|
||||||
ARG TOKEN
|
|
||||||
|
|
||||||
WORKDIR /toolsrc
|
WORKDIR /toolsrc
|
||||||
RUN git clone https://$USER:$TOKEN@git.broccolimicro.io/Broccoli/act-06.git
|
RUN --mount=type=secret,id=user --mount=type=secret,id=token git clone https://$(cat /run/secrets/user):$(cat /run/secrets/token)@git.broccolimicro.io/Broccoli/act-06.git
|
||||||
WORKDIR act-06
|
WORKDIR act-06
|
||||||
RUN make
|
RUN make
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user