Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Azure Cloudshell #6

Merged
merged 3 commits into from
Feb 21, 2022
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
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/powershell:7.1.0-alpine-3.12-20201116
FROM mcr.microsoft.com/azure-cloudshell@sha256:075eadba1d78d537fa188fe82d4bc0f6e552ab3416d60c0b43bff5fd5372535e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is strange decision on cloud-shell side not to publish versioned containers even after fact that they have versioned releases 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was kind of strange that they didn't even seem to have a page in dockerhub. I have this feeling that we are doing something wrong here. :D


COPY ./Login.ps1 /etc/util-scripts/Login.ps1

Expand All @@ -8,7 +8,7 @@ ARG DOCKER_VERSION="18.03.1"
ARG DOCKER_URI="https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}-ce.tgz"
ARG DOCKER_GID="412"

RUN apk --no-cache add curl && \
RUN apt install curl && \
curl ${DOCKER_URI} -o /tmp/docker-${DOCKER_VERSION}.tgz && \
cd /tmp && \
tar -xvzf /tmp/docker-${DOCKER_VERSION}.tgz docker/docker && \
Expand All @@ -17,9 +17,8 @@ RUN apk --no-cache add curl && \
rm -v /tmp/docker-${DOCKER_VERSION}.tgz && \
chmod -v +x ${DOCKER_PATH}/docker

RUN addgroup -S -g ${DOCKER_GID} docker && \
adduser -S -G docker docker && \
adduser -G docker -u 1000 -D jenkins
RUN addgroup --system --gid ${DOCKER_GID} docker && \
adduser --system --ingroup docker docker && \
adduser --ingroup docker -u 1000 --disabled-password jenkins

RUN pwsh -command 'Install-Module -Name Az -AllowClobber -Scope CurrentUser -Force -RequiredVersion 4.2.0' && \
chmod +x /etc/util-scripts/Login.ps1
RUN chmod +x /etc/util-scripts/Login.ps1
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'jenkins-ptcs-library@3.0.0'
library 'jenkins-ptcs-library@4.0.3'

podTemplate(label: pod.label,
containers: pod.templates
Expand All @@ -12,4 +12,4 @@ podTemplate(label: pod.label,
publishTagToDockerhub("azure-ci-toolbox")
}
}
}
}
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# azure-ci-container

Since <https://hub.docker.com/r/azuresdk/azure-powershell-core> is not supported and broken
we use extended self built image for CI.

## Tools

- Powershell 7
- Powershell AZ module
https://github.com/Azure/CloudShell with docker in docker -support.