Skip to content

Commit b9de846

Browse files
committed
feat: install azure-cli in our test runner
1 parent 7229492 commit b9de846

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/actions/login-private-registry/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ runs:
7878
with:
7979
creds: '{"clientId": "${{ inputs.cos_username }}", "clientSecret": "${{ inputs.cos_password }}", "tenantId": "${{ inputs.cos_tenant }}", "subscriptionId": "${{ inputs.cos_subscription }}"}'
8080
- name: Login to orica cosmos private registry
81-
uses: azure/cli@v2
81+
shell: bash
8282
if: inputs.cos_username != '' && inputs.cos_password != '' && inputs.cos_tenant != '' && inputs.cos_subscription != ''
83-
with:
84-
inlineScript: |
85-
az account get-access-token --query "join(' ', ['Bearer', accessToken])" --output tsv | cargo login --registry cos
83+
run: |
84+
az login --service-principal --username ${{ inputs.cos_username }} --password ${{ inputs.cos_password }} --tenant ${{ inputs.cos_tenant }}
85+
az account get-access-token --query "join(' ', ['Bearer', accessToken])" --output tsv | cargo login --registry cos
8686
- name: Login to our private npm registry
8787
uses: actions/setup-node@v4
8888
with:

docker/rust-tests/Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ FROM ghcr.io/actions/actions-runner:$GITHUB_RUNNER_VERSION
33
ARG RUST_VERSION=1.77
44
ARG SCCACHE_VERSION=0.7.7
55

6-
6+
RUN sudo apt-get update && sudo apt-get install -y \
7+
apt-transport-https ca-certificates curl gnupg lsb-release
8+
RUN sudo mkdir -p /etc/apt/keyrings
9+
RUN curl -sLS https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null
10+
RUN sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
11+
RUN AZ_DIST=$(lsb_release -cs) echo 'Types: deb\n\
12+
URIs: https://packages.microsoft.com/repos/azure-cli/\n\
13+
Suites: jammy\n\
14+
Components: main\n\
15+
Architectures: amd64\n\
16+
Signed-by: /etc/apt/keyrings/microsoft.gpg' | sudo tee /etc/apt/sources.list.d/azure-cli.sources
717
RUN sudo apt-get update && sudo apt-get install -y \
818
software-properties-common \
919
build-essential \
@@ -52,6 +62,7 @@ RUN sudo apt-get update && sudo apt-get install -y \
5262
librust-atk-dev \
5363
jq \
5464
libclang-dev \
65+
azure-cli \
5566
clang
5667

5768
# Install Node v20 and AWS CDK
@@ -79,6 +90,8 @@ RUN DPKG_ARCH="$(dpkg --print-architecture)" \
7990
&& YQ_DOWNLOAD_URL=$(curl -sL -H "Accept: application/vnd.github+json" https://api.github.com/repos/mikefarah/yq/releases/latest | jq ".assets[] | select(.name == \"yq_linux_${DPKG_ARCH}.tar.gz\")" | jq -r '.browser_download_url') \
8091
&& ( curl -s ${YQ_DOWNLOAD_URL} -L -o /tmp/yq.tar.gz && tar -xzf /tmp/yq.tar.gz -C /tmp && sudo mv /tmp/yq_linux_${DPKG_ARCH} /usr/local/bin/yq)
8192

93+
# Install
94+
8295
RUN rustup component add clippy rustfmt
8396
RUN cargo install --locked cargo-deny
8497
RUN cargo install cargo-machete

0 commit comments

Comments
 (0)