Skip to content

Commit

Permalink
Update Agent to latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
giggio committed May 29, 2018
1 parent b821ac9 commit 3007039
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This repository contains `Dockerfile` definitions for [lambda3/vsts-agent](https
## Configuration

For `latest`, you need to set these environment variables:

* `AGENT_PAT` - The personal access token from VSTS. Required.
* `VS_TENANT` - The VSTS tenant, a.k.a. the value that goes before .visualstudio.com, i.e., on foo.visualstudio.com, should be `foo`. Required.
* `AGENT_POOL` - The agent pool. Optional. Default value: `Default`
Expand Down Expand Up @@ -47,4 +48,3 @@ See [LICENSE.txt](https://github.com/lambda3/vsts-agent/blob/master/LICENSE.txt)
Check out the terms of the license before you contribute, fork, copy or do anything
with the code. If you decide to contribute you agree to grant copyright of all your contribution to this project, and agree to
mention clearly if do not agree to these terms. Your work will be licensed with the project at Apache V2, along the rest of the code.

2 changes: 1 addition & 1 deletion agent-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM lambda3/vsts-agent

USER root
RUN curl -fsSL https://get.docker.com/ | sh
RUN curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \
RUN curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
RUN usermod -aG docker agentuser
COPY preConfigure.sh /agent/
Expand Down
39 changes: 25 additions & 14 deletions agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
FROM ubuntu:16.04
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y software-properties-common curl unzip vim apt-transport-https libunwind8 libcurl3 sudo iputils-ping && \
apt-get install -y software-properties-common curl unzip vim apt-transport-https libunwind8 sudo iputils-ping wget && \
apt-add-repository ppa:git-core/ppa && \
apt-get update && \
apt-get install -y git
RUN echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list && \
apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 && \
# netcore
RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg && \
mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ && \
wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list && \
mv prod.list /etc/apt/sources.list.d/microsoft-prod.list && \
apt-get update && \
apt-get install dotnet-dev-1.0.0-preview2-003121 -y
apt-get install -y dotnet-sdk-2.1.200
#users
RUN adduser --disabled-password --gecos '' agentuser && \
adduser agentuser sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# az cli:
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | \
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" | \
tee /etc/apt/sources.list.d/azure-cli.list && \
apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893 && \
curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
apt-get update && \
apt-get install -y azure-cli
# pwsh:
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/microsoft.list && \
apt-get update && \
apt-get install -y powershell
RUN curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/powershell-6.0.2-linux-x64.tar.gz && \
mkdir -p /opt/microsoft/powershell/6.0.2 && \
tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/6.0.2 && \
rm /tmp/powershell.tar.gz && \
chmod +x /opt/microsoft/powershell/6.0.2/pwsh && \
ln -s /opt/microsoft/powershell/6.0.2/pwsh /usr/bin/pwsh
##
RUN apt-get install -y libuuid1 libicu60
# deps update
# RUN curl https://raw.githubusercontent.com/Microsoft/vsts-agent/master/src/Misc/layoutbin/installdependencies.sh | bash -
#agent
RUN mkdir /agent
RUN chown -R agentuser:agentuser /agent
USER agentuser
WORKDIR /agent
RUN curl -sOSL https://github.com/Microsoft/vsts-agent/releases/download/v2.124.0/vsts-agent-ubuntu.16.04-x64-2.124.0.tar.gz && \
tar xzf /agent/vsts-agent-ubuntu.16.04-x64-2.124.0.tar.gz && \
rm /agent/vsts-agent-ubuntu.16.04-x64-2.124.0.tar.gz
RUN curl -sOSL https://vstsagentpackage.azureedge.net/agent/2.134.2/vsts-agent-linux-x64-2.134.2.tar.gz && \
tar xzf /agent/vsts-agent-linux-x64-2.134.2.tar.gz && \
rm /agent/vsts-agent-linux-x64-2.134.2.tar.gz
COPY configureAgent.sh runAgent.sh configureAndRun.sh /agent/
USER root
RUN chmod +x configureAndRun.sh configureAgent.sh runAgent.sh && \
Expand Down

0 comments on commit 3007039

Please sign in to comment.