Skip to content

Commit

Permalink
revert dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
guyzsarun committed Aug 9, 2023
1 parent 374f6c8 commit a196da8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 36 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,16 @@ jobs:
uses: actions/checkout@v2

- uses: docker/setup-buildx-action@v2
with:
driver: docker

- name: Build Base Docker image
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile.base
file: docker/Dockerfile
tags: ${{ env.BASE_TAG }}
load: true

- name: Build Test Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile.test
build-contexts: |
base_img=docker-image://${{ env.BASE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max

test-json:
name: Test JSON Conversion
Expand All @@ -43,19 +35,18 @@ jobs:
uses: actions/checkout@v2

- uses: docker/setup-buildx-action@v2
with:
driver: docker

- name: Build Test Docker image
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile.test
tags: user/xrootd-cmstfc:test
build-contexts: |
base_img=docker-image://${{ env.BASE_TAG }}
file: docker/Dockerfile
tags: ${{ env.BASE_TAG }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Unit test
run: |
docker run --rm user/xrootd-cmstfc:test python3 -m pytest -v
docker run --rm ${{ env.BASE_TAG }} python3 -m pytest -v
12 changes: 12 additions & 0 deletions docker/Dockerfile.base → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ RUN yum install -y cmake \
xrootd-devel \
https://cbs.centos.org/kojifiles/packages/jsoncpp/1.9.4/4.el8s/x86_64/jsoncpp-1.9.4-4.el8s.x86_64.rpm \
https://cbs.centos.org/kojifiles/packages/jsoncpp/1.9.4/4.el8s/x86_64/jsoncpp-devel-1.9.4-4.el8s.x86_64.rpm


RUN pip3 install pytest

COPY . .

RUN mkdir -p build
RUN cd build && \
cmake .. -DBUILD_TEST=true && \
make && \
make install

16 changes: 0 additions & 16 deletions docker/Dockerfile.test

This file was deleted.

0 comments on commit a196da8

Please sign in to comment.