Skip to content

Commit

Permalink
Pass branch name as arg from yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsa committed May 21, 2024
1 parent 91ddff0 commit b4a701f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ jobs:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- name: build zombie-tester
working-directory: ./zombienet/docker
run: make tester
run: make tester BRANCH_NAME=${{ github.head_ref }}
- name: Run test
working-directory: ./zombienet/docker
run: make ${{ matrix.options.test }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zombie-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- name: build zombie-tester
working-directory: ./zombienet/docker
run: make tester
run: make tester BRANCH_NAME=${{ github.head_ref }}
- name: Run test
working-directory: ./zombienet/docker
run: make ${{ matrix.options.test }}
3 changes: 1 addition & 2 deletions zombienet/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ tester:
python3 version.py https://github.com/paritytech/polkadot-sdk && \
if [ -f polkadot-sdk-versions.txt ]; then \
POLKADOT_SDK_RELEASE=$$(grep 'polkadot_format_version:' polkadot-sdk-versions.txt | cut -d ' ' -f 2); \
BRANCH_NAME="$(git rev-parse --abbrev-ref HEAD)" \
DOCKER_BUILDKIT=0 docker build --platform linux/amd64 --no-cache -t qdrvm/zombie-tester:latest -f tester.Dockerfile \
--build-arg POLKADOT_SDK_RELEASE=$$POLKADOT_SDK_RELEASE \
--build-arg BRANCH_NAME=$$BRANCH_NAME . ; \
--build-arg BRANCH_NAME=$(BRANCH_NAME) . ; \
else \
echo "One or more files are missing."; \
fi
Expand Down
3 changes: 2 additions & 1 deletion zombienet/docker/tester.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ FROM qdrvm/kagome:latest as kagome

FROM qdrvm/zombie-builder:$POLKADOT_SDK_RELEASE AS tester
COPY --from=kagome /usr/local/bin/kagome /home/nonroot/bin
RUN git clone https://github.com/qdrvm/kagome.git -b $BRANCH_NAME
RUN echo ${BRANCH_NAME}
RUN git clone https://github.com/qdrvm/kagome.git -b ${BRANCH_NAME}

# TODO(kamilsa): #2099 Remove this once we have a proper way to precompile
RUN mkdir /tmp/kagome/
Expand Down

0 comments on commit b4a701f

Please sign in to comment.