зеркало из https://github.com/microsoft/CCF.git
Build per revision CI image from last CI container (#4737)
This commit is contained in:
Родитель
538c1346f2
Коммит
9fed4d0e30
|
@ -40,8 +40,11 @@ jobs:
|
||||||
- name: Log in
|
- name: Log in
|
||||||
run: docker login -u $ACR_TOKEN_NAME -p ${{ secrets.ACR_CI_PUSH_TOKEN_PASSWORD }} $ACR_REGISTRY
|
run: docker login -u $ACR_TOKEN_NAME -p ${{ secrets.ACR_CI_PUSH_TOKEN_PASSWORD }} $ACR_REGISTRY
|
||||||
|
|
||||||
|
- name: Pull CI container
|
||||||
|
run: docker pull $ACR_REGISTRY/ccf/ci:oe-0.18.4-dcap-ql-dev-snp
|
||||||
|
|
||||||
- name: Build CCF CI SNP container
|
- name: Build CCF CI SNP container
|
||||||
run: docker build -f docker/ccf_ci_built . --build-arg="platform=snp" -t $ACR_REGISTRY/ccf/ci:pr-${{ github.event.pull_request.head.sha }}
|
run: docker build -f docker/ccf_ci_built . --build-arg="base=oe-0.18.4-dcap-ql-dev" --build-arg="platform=snp" -t $ACR_REGISTRY/ccf/ci:pr-${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Push CI container
|
- name: Push CI container
|
||||||
run: docker push $ACR_REGISTRY/ccf/ci:pr-${{ github.event.pull_request.head.sha }}
|
run: docker push $ACR_REGISTRY/ccf/ci:pr-${{ github.event.pull_request.head.sha }}
|
||||||
|
|
|
@ -2,39 +2,13 @@
|
||||||
# Contains CCF build dependencies and toolchain for target platform
|
# Contains CCF build dependencies and toolchain for target platform
|
||||||
# Also contains CCF source and build directory
|
# Also contains CCF source and build directory
|
||||||
|
|
||||||
|
# Latest image as of this change
|
||||||
ARG platform=sgx
|
ARG platform=sgx
|
||||||
|
ARG base=ccfmsrc.azurecr.io/ccf/ci:oe-0.18.4-dcap-ql-dev
|
||||||
|
FROM ${base}-${platform}
|
||||||
|
|
||||||
# SGX
|
# Copy CCF source and build
|
||||||
FROM ubuntu:20.04 AS base-sgx
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
COPY ./docker/sgx_deps_pin.sh /
|
|
||||||
RUN ./sgx_deps_pin.sh && rm ./sgx_deps_pin.sh
|
|
||||||
|
|
||||||
# SNP
|
|
||||||
FROM ubuntu:20.04 AS base-snp
|
|
||||||
|
|
||||||
# Virtual
|
|
||||||
FROM ubuntu:20.04 AS base-virtual
|
|
||||||
|
|
||||||
# Final CCF CI image
|
|
||||||
FROM base-${platform} AS final
|
|
||||||
|
|
||||||
ARG platform=sgx
|
ARG platform=sgx
|
||||||
ARG ansible_vars
|
|
||||||
|
|
||||||
RUN echo "APT::Acquire::Retries \"5\";" | tee /etc/apt/apt.conf.d/80-retries
|
|
||||||
|
|
||||||
COPY getting_started/setup_vm/ /tmp/setup_vm/
|
|
||||||
RUN apt update \
|
|
||||||
&& apt install -y ansible software-properties-common bsdmainutils dnsutils \
|
|
||||||
&& cd /tmp/setup_vm \
|
|
||||||
&& ansible-playbook ccf-dev.yml --extra-vars "$ansible_vars" --extra-vars "platform=${platform}" \
|
|
||||||
&& rm -rf /tmp/* \
|
|
||||||
&& apt remove -y ansible software-properties-common \
|
|
||||||
&& apt -y autoremove \
|
|
||||||
&& apt -y clean
|
|
||||||
|
|
||||||
RUN mkdir /CCF
|
RUN mkdir /CCF
|
||||||
COPY . /CCF/
|
COPY . /CCF/
|
||||||
RUN mkdir /CCF/build && cd /CCF/build && cmake -GNinja -DCOMPILE_TARGET=${platform} .. && ninja
|
RUN mkdir /CCF/build && cd /CCF/build && cmake -GNinja -DCOMPILE_TARGET=${platform} .. && ninja
|
||||||
|
|
Загрузка…
Ссылка в новой задаче