Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/docker-tools/templates/stages/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ parameters:
################################################################################
stages:
- stage: Build
condition: and(succeededOrFailed(), contains(variables['stages'], 'build'))
condition: and(succeeded(), contains(variables['stages'], 'build'))
dependsOn: []
jobs:

Expand Down Expand Up @@ -212,7 +212,7 @@ stages:
################################################################################
- stage: Post_Build
dependsOn: Build
condition: and(succeeded(), contains(variables['stages'], 'build'))
condition: and(succeededOrFailed(), contains(variables['stages'], 'build'))
jobs:
- template: /eng/docker-tools/templates/jobs/post-build.yml@self
parameters:
Expand Down
9 changes: 9 additions & 0 deletions src/ubuntu/22.04/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ RUN apt-get update \
file \
&& rm -rf /var/lib/apt/lists/*

# Token used to authenticate to the dotnet-public-npm Azure Artifacts feed.
ARG NPM_TOKEN

# Install Node 20 from NodeSource and use the patched npm ip module.
# When NPM_TOKEN is provided (internal builds) use the dotnet-public-npm Azure Artifacts feed;
# otherwise fall back to the default public registry (public builds have no token).
RUN cd /etc/apt/sources.list.d && \
rm -f nodesource.list && \
cd ~ && \
Expand All @@ -86,6 +91,10 @@ RUN cd /etc/apt/sources.list.d && \
apt-get install nodejs -y && \
rm -rf /var/lib/apt/lists/* && \
rm -f nodesource_setup.sh && \
if [ -n "$NPM_TOKEN" ]; then \
npm config set registry https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ && \
npm config set "//pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/:_authToken" "$NPM_TOKEN"; \
fi && \
npm install -g ip@latest

ENV NO_UPDATE_NOTIFIER=true
9 changes: 9 additions & 0 deletions src/ubuntu/22.04/coredeps/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ RUN apt-get update \
uuid-dev \
&& rm -rf /var/lib/apt/lists/*

# Token used to authenticate to the dotnet-public-npm Azure Artifacts feed.
ARG NPM_TOKEN

# Install Node 20 from NodeSource and use the patched npm ip module.
# When NPM_TOKEN is provided (internal builds) use the dotnet-public-npm Azure Artifacts feed;
# otherwise fall back to the default public registry (public builds have no token).
RUN cd /etc/apt/sources.list.d && \
rm -f nodesource.list && \
cd ~ && \
Expand All @@ -41,4 +46,8 @@ RUN cd /etc/apt/sources.list.d && \
apt-get install nodejs -y && \
rm -rf /var/lib/apt/lists/* && \
rm -f nodesource_setup.sh && \
if [ -n "$NPM_TOKEN" ]; then \
npm config set registry https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ && \
npm config set "//pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/:_authToken" "$NPM_TOKEN"; \
fi && \
npm install -g ip@latest
9 changes: 9 additions & 0 deletions src/ubuntu/24.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,23 @@ RUN ARCH=$(dpkg --print-architecture) \
&& ln -s /opt/microsoft/powershell/pwsh /usr/bin/pwsh \
&& rm -f /tmp/powershell.tar.gz

# Token used to authenticate to the dotnet-public-npm Azure Artifacts feed.
ARG NPM_TOKEN

# Install node 20 and use its bundled npm so we don't pull in distro npm dependencies unnecessarily.
# When NPM_TOKEN is provided (internal builds) use the dotnet-public-npm Azure Artifacts feed;
# otherwise fall back to the default public registry (public builds have no token).
RUN rm -f /etc/apt/sources.list.d/nodesource.list && \
cd ~ && \
curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh && \
bash nodesource_setup.sh && \
apt-get install nodejs -y && \
rm -rf /var/lib/apt/lists/* && \
rm -f nodesource_setup.sh && \
if [ -n "$NPM_TOKEN" ]; then \
npm config set registry https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ && \
npm config set "//pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/:_authToken" "$NPM_TOKEN"; \
fi && \
npm install -g ip@latest

ENV NO_UPDATE_NOTIFIER=true
9 changes: 9 additions & 0 deletions src/ubuntu/26.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,23 @@ RUN ARCH=$(dpkg --print-architecture) \
&& ln -s /opt/microsoft/powershell/pwsh /usr/bin/pwsh \
&& rm -f /tmp/powershell.tar.gz

# Token used to authenticate to the dotnet-public-npm Azure Artifacts feed.
ARG NPM_TOKEN

# Install node 20 and use its bundled npm so we don't pull in distro npm dependencies unnecessarily.
# When NPM_TOKEN is provided (internal builds) use the dotnet-public-npm Azure Artifacts feed;
# otherwise fall back to the default public registry (public builds have no token).
RUN rm -f /etc/apt/sources.list.d/nodesource.list && \
cd ~ && \
curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh && \
bash nodesource_setup.sh && \
apt-get install nodejs -y && \
rm -rf /var/lib/apt/lists/* && \
rm -f nodesource_setup.sh && \
if [ -n "$NPM_TOKEN" ]; then \
npm config set registry https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ && \
npm config set "//pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/:_authToken" "$NPM_TOKEN"; \
fi && \
npm install -g ip@latest

ENV NO_UPDATE_NOTIFIER=true
Loading