Skip to content

Commit

Permalink
Add repo tool to images
Browse files Browse the repository at this point in the history
The google repo tool helps manage projects with multiple git repos.
Some use it for yocto.

Closes: crops#22

Signed-off-by: Cormier, Jonathan <[email protected]>
  • Loading branch information
jcormier committed Sep 14, 2018
1 parent 2459fd0 commit cd02be1
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ cd -

# base tests
./tests/container/vnc-test.sh $REPO:$DISTRO_TO_BUILD-base
./tests/container/repo-test.sh $REPO:$DISTRO_TO_BUILD-base
# builder tests
./tests/container/smoke.sh $REPO:$DISTRO_TO_BUILD-builder

Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/centos/centos-7/centos-7-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ RUN yum -y install epel-release && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
groupadd -g 1000 yoctouser && \
useradd -u 1000 -g yoctouser -m yoctouser

Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/debian/debian-8/debian-8-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ RUN apt-get update && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser && \
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen

Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/debian/debian-9/debian-9-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ RUN apt-get clean && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser && \
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen

Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/fedora/fedora-24/fedora-24-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ RUN dnf -y update && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser

COPY build-install-dumb-init.sh /
Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/fedora/fedora-25/fedora-25-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ RUN dnf -y update && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser

COPY build-install-dumb-init.sh /
Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/fedora/fedora-26/fedora-26-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ RUN dnf -y update && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser

COPY build-install-dumb-init.sh /
Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/fedora/fedora-27/fedora-27-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ RUN dnf -y update && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser

COPY build-install-dumb-init.sh /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ RUN zypper --non-interactive install python \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser

COPY build-install-dumb-init.sh /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ RUN zypper --non-interactive install python \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser

COPY build-install-dumb-init.sh /
Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/ubuntu/ubuntu-14.04/ubuntu-14.04-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ RUN apt-get update && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser && \
/usr/sbin/locale-gen en_US.UTF-8

Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/ubuntu/ubuntu-16.04/ubuntu-16.04-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ RUN apt-get update && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser && \
/usr/sbin/locale-gen en_US.UTF-8

Expand Down
3 changes: 3 additions & 0 deletions dockerfiles/ubuntu/ubuntu-17.10/ubuntu-17.10-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ RUN apt-get update && \
mkdir /etc/vncskel/.vnc && \
echo "" | vncpasswd -f > /etc/vncskel/.vnc/passwd && \
chmod 0600 /etc/vncskel/.vnc/passwd && \
# Repo is a useful tool for checking out multiple git repos
wget https://storage.googleapis.com/git-repo-downloads/repo -O /usr/local/bin/repo && \
chmod +x /usr/local/bin/repo && \
useradd -U -m yoctouser && \
/usr/sbin/locale-gen en_US.UTF-8

Expand Down
31 changes: 31 additions & 0 deletions tests/container/repo-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# repo-test
#
# Copyright (C) 2016 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

set -e
set -x


# Pass in the image that was built for docker
image=$1
workdir=`mktemp -d --suffix=vnc`
SCRIPT_DIR=$(dirname $(readlink -f $0))

docker run -t --rm -v $workdir:/workdir \
$image repo help init
rm $workdir -rf

0 comments on commit cd02be1

Please sign in to comment.