diff --git a/infra/.dockerignore b/infra/.dockerignore new file mode 100644 index 000000000..1e82e3e75 --- /dev/null +++ b/infra/.dockerignore @@ -0,0 +1 @@ +test_files \ No newline at end of file diff --git a/infra/cifuzz/actions/build_fuzzers/Dockerfile b/infra/build_fuzzers.Dockerfile similarity index 80% rename from infra/cifuzz/actions/build_fuzzers/Dockerfile rename to infra/build_fuzzers.Dockerfile index 56ff74f26..49e438575 100644 --- a/infra/cifuzz/actions/build_fuzzers/Dockerfile +++ b/infra/build_fuzzers.Dockerfile @@ -13,12 +13,15 @@ # limitations under the License. # ################################################################################ -# Docker image to run CIFuzz in. +# Docker image to run the CIFuzz action build_fuzzers in. FROM gcr.io/oss-fuzz-base/cifuzz-base # Copies your code file from action repository to the container -COPY build_fuzzers_entrypoint.py /opt/build_fuzzers_entrypoint.py +COPY cifuzz/actions/build_fuzzers/build_fuzzers_entrypoint.py /opt/build_fuzzers_entrypoint.py # Python file to execute when the docker container starts up ENTRYPOINT ["python3", "/opt/build_fuzzers_entrypoint.py"] + +# Update infra source code. +ADD . ${OSS_FUZZ_ROOT}/infra diff --git a/infra/cifuzz/actions/build_fuzzers/action.yml b/infra/cifuzz/actions/build_fuzzers/action.yml index 534f71552..20420eb37 100644 --- a/infra/cifuzz/actions/build_fuzzers/action.yml +++ b/infra/cifuzz/actions/build_fuzzers/action.yml @@ -16,7 +16,7 @@ inputs: default: 'address' runs: using: 'docker' - image: 'Dockerfile' + image: '../../../build_fuzzers.Dockerfile' env: OSS_FUZZ_PROJECT_NAME: ${{ inputs.oss-fuzz-project-name }} DRY_RUN: ${{ inputs.dry-run}} diff --git a/infra/cifuzz/actions/run_fuzzers/action.yml b/infra/cifuzz/actions/run_fuzzers/action.yml index 3ce951d83..8434753f5 100644 --- a/infra/cifuzz/actions/run_fuzzers/action.yml +++ b/infra/cifuzz/actions/run_fuzzers/action.yml @@ -17,7 +17,7 @@ inputs: default: 'address' runs: using: 'docker' - image: 'Dockerfile' + image: '../../../run_fuzzers.Dockerfile' env: OSS_FUZZ_PROJECT_NAME: ${{ inputs.oss-fuzz-project-name }} FUZZ_SECONDS: ${{ inputs.fuzz-seconds }} diff --git a/infra/cifuzz/cifuzz-base/Dockerfile b/infra/cifuzz/cifuzz-base/Dockerfile index 3d887b4d5..e006c2b48 100644 --- a/infra/cifuzz/cifuzz-base/Dockerfile +++ b/infra/cifuzz/cifuzz-base/Dockerfile @@ -35,3 +35,4 @@ RUN apt-get update && apt-get install docker-ce docker-ce-cli containerd.io -y ENV OSS_FUZZ_ROOT=/opt/oss-fuzz ADD . ${OSS_FUZZ_ROOT} +RUN rm -rf ${OSS_FUZZ_ROOT}/infra diff --git a/infra/cifuzz/actions/run_fuzzers/Dockerfile b/infra/run_fuzzers.Dockerfile similarity index 81% rename from infra/cifuzz/actions/run_fuzzers/Dockerfile rename to infra/run_fuzzers.Dockerfile index 3a5fb8b07..938cf0881 100644 --- a/infra/cifuzz/actions/run_fuzzers/Dockerfile +++ b/infra/run_fuzzers.Dockerfile @@ -13,12 +13,15 @@ # limitations under the License. # ################################################################################ -# Docker image to run CIFuzz run fuzzers action in. +# Docker image to run the CIFuzz action run_fuzzers in. FROM gcr.io/oss-fuzz-base/cifuzz-base # Copies your code file from action repository to the container -COPY run_fuzzers_entrypoint.py /opt/run_fuzzers_entrypoint.py +COPY cifuzz/actions/run_fuzzers/run_fuzzers_entrypoint.py /opt/run_fuzzers_entrypoint.py # Python file to execute when the docker container starts up ENTRYPOINT ["python3", "/opt/run_fuzzers_entrypoint.py"] + +# Copy infra source code. +ADD . ${OSS_FUZZ_ROOT}/infra \ No newline at end of file