Fix cross-comp CI pipeline (ARM & MIPS32) to build against target branch instead of main (#2509)
The ARM and the MIPS32 cross-compilation jobs in .vsts-ci.yml will always target the main branch, ignoring the branch a given PR is based on and letting potential issues sip through. This change fixes the ARM and MIPS32 jobs so they run against whatever branch the pipeline is running against.
This commit is contained in:
Родитель
979d0718d2
Коммит
f14ea559b8
|
@ -959,7 +959,7 @@ jobs:
|
|||
displayName: 'Setup'
|
||||
- script: |
|
||||
cd samples/dockerbuilds/MIPS32
|
||||
docker build -t mipsiotbuild:latest . --network=host
|
||||
docker build --build-arg TARGET_BRANCH=$BUILD_SOURCEBRANCH -t mipsiotbuild:latest . --network=host
|
||||
cd ..
|
||||
docker build -t mipsiotapp:latest . --network=host --file ./MIPS32/Dockerfile_adjunct
|
||||
displayName: 'Build MIPS32'
|
||||
|
@ -981,7 +981,7 @@ jobs:
|
|||
displayName: 'Setup'
|
||||
- script: |
|
||||
cd samples/dockerbuilds/ARM
|
||||
docker build -t armiotbuild:latest . --network=host
|
||||
docker build --build-arg TARGET_BRANCH=$BUILD_SOURCEBRANCH -t armiotbuild:latest . --network=host
|
||||
cd ..
|
||||
docker build -t armiotapp:latest . --network=host --file ./ARM/Dockerfile_adjunct
|
||||
displayName: 'Build ARM'
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
FROM ubuntu:latest
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG TARGET_BRANCH=main
|
||||
|
||||
#########################################
|
||||
# start from home directory
|
||||
|
@ -74,6 +75,8 @@ WORKDIR ..
|
|||
# Build Azure C SDK
|
||||
RUN git clone https://github.com/azure/azure-iot-sdk-c.git
|
||||
WORKDIR azure-iot-sdk-c
|
||||
RUN git fetch origin $TARGET_BRANCH
|
||||
RUN git checkout FETCH_HEAD
|
||||
RUN git submodule update --init
|
||||
RUN mkdir cmake
|
||||
WORKDIR cmake
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
FROM ubuntu:latest
|
||||
ARG TARGET_BRANCH=main
|
||||
|
||||
#########################################
|
||||
# start from home directory
|
||||
|
@ -80,6 +81,8 @@ WORKDIR ..
|
|||
|
||||
RUN git clone https://github.com/azure/azure-iot-sdk-c.git
|
||||
WORKDIR azure-iot-sdk-c
|
||||
RUN git fetch origin $TARGET_BRANCH
|
||||
RUN git checkout FETCH_HEAD
|
||||
RUN git submodule update --init
|
||||
RUN mkdir cmake
|
||||
WORKDIR cmake
|
||||
|
|
Загрузка…
Ссылка в новой задаче