Skip to content

Commit f06b9f1

Browse files
authored
clone and copy into container (#64)
* clone and copy into container
1 parent c392fd9 commit f06b9f1

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

.circleci/config.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@ commands:
205205
type: string
206206
description: "Path to persist Docker archive"
207207
default: "~/docker"
208-
build-arg:
209-
type: string
210-
description: "Args to pass into docker file"
211-
default: ""
212208
steps:
213209
- when:
214210
condition: <<parameters.import>>
@@ -226,11 +222,7 @@ commands:
226222
DIRNAME="$(dirname "$DOCKERFILE")"
227223
228224
cd "$DIRNAME" || exit 1
229-
if [ -z "<<parameters.build-arg>>" ]; then
230-
docker build . --cache-from "<<parameters.image>>" -t "<<parameters.image>>" -f "$BASENAME"
231-
else
232-
docker build . --cache-from "<<parameters.image>>" -t "<<parameters.image>>" -f "$BASENAME" --build-arg <<parameters.build-arg>>
233-
fi
225+
docker build . --cache-from "<<parameters.image>>" -t "<<parameters.image>>" -f "$BASENAME"
234226
- when:
235227
condition: <<parameters.export>>
236228
steps:
@@ -386,11 +378,13 @@ jobs:
386378
steps:
387379
- setup_remote_docker
388380
- attach_workspace: *attach_workspace
381+
- run: |
382+
echo ${GITHUB_TOKEN} | git clone https://omisego-bot@github.com/omgnetwork/$(cat tester/CONTRACT_REPO_NAME).git tester/plasma-contracts
389383
- docker_build:
390384
image: "omisegoimages/elixir-omg-tester-plasma-deployer"
391385
dockerfile: "tester/Dockerfile.plasma_deployer"
392386
export: "~/docker/omisegoimages_elixir-omg_tester_plasma_deployer.tar"
393-
build-arg: "GITHUB_TOKEN=${GITHUB_TOKEN}"
387+
394388
- persist_to_workspace:
395389
<<: *persist_workspace
396390
paths:

tester/Dockerfile.plasma_deployer

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM node:10.22-alpine
22

3-
MAINTAINER OmiseGO Engineering <info@omisego.co>
4-
5-
ARG GITHUB_TOKEN
3+
MAINTAINER OMG Network Engineering <engineering@omg.network>
64

75
WORKDIR /home/node
86

@@ -15,10 +13,7 @@ RUN apk add --update \
1513

1614
COPY CONTRACT_SHA /tmp/CONTRACT_SHA
1715
COPY CONTRACT_REPO_NAME /tmp/CONTRACT_REPO_NAME
18-
19-
# pass in token for prompt instead of git clone https://${GITHUB_TOKEN}@github.com... to avoid
20-
# leaving the token data in .git/config
21-
RUN echo ${GITHUB_TOKEN} | git clone https://omisego-bot@github.com/omgnetwork/$(cat /tmp/CONTRACT_REPO_NAME).git plasma-contracts
16+
COPY plasma-contracts /home/node/plasma-contracts
2217
RUN cd /home/node/plasma-contracts && git reset --hard $(cat /tmp/CONTRACT_SHA)
2318
RUN cd /home/node/plasma-contracts && npm install
2419
RUN cd /home/node/plasma-contracts/plasma_framework && rm -Rf ./build

0 commit comments

Comments
 (0)