Skip to content

Commit

Permalink
Merge branch 'ci-testing'
Browse files Browse the repository at this point in the history
Enables using [testing] on CI, can be removed in future
  • Loading branch information
Jguer committed Oct 22, 2019
2 parents e140386 + d50ca04 commit c0e78c8
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 11 deletions.
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ LABEL maintainer="Jguer,joaogg3 at google mail"
ENV GO111MODULE=on
WORKDIR /app

ADD ./testdata/ci/pacman.conf /etc/pacman.conf

RUN pacman -Syu --overwrite=* --needed --noconfirm \
gcc gnupg libldap go git tar make awk linux-api-headers pacman-contrib && paccache -rfk0
gcc gnupg libldap go git tar make awk linux-api-headers pacman pacman-contrib && paccache -rfk0

# Dependency for linting
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /bin v1.20.0
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /bin v1.20.0
RUN go get golang.org/x/lint/golint && mv /root/go/bin/golint /bin/

ENV ARCH=$BUILD_ARCH
ADD . .
COPY . .

FROM builder_env AS builder

Expand All @@ -26,15 +28,15 @@ RUN pacman -Syu --overwrite=* --needed --noconfirm \
git base-devel awk pacman-contrib && paccache -rfk0

# Gracefully removed from https://github.com/Cognexa/dockerfiles/blob/master/dockerfiles/archlinux
RUN useradd -m -s /bin/bash aur \
&& passwd -d aur \
&& echo 'aur ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/aur \
&& echo 'Defaults env_keep += "EDITOR"' >> /etc/sudoers.d/aur
RUN useradd -m -s /bin/bash aur && \
passwd -d aur && \
echo 'aur ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/aur && \
echo 'Defaults env_keep += "EDITOR"' >>/etc/sudoers.d/aur

ENV EDITOR vim

# set UTF-8 locale
RUN echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && locale-gen
RUN echo 'en_US.UTF-8 UTF-8' >/etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8

WORKDIR /work/
Expand Down
3 changes: 0 additions & 3 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ func TestConfig(t *testing.T) {
hook, err := h.HookDirs()
expect(t, "HookDir", []string{"/usr/share/libalpm/hooks/", "/hookdir/"}, hook.Slice(), err)

delta, err := h.DeltaRatio()
expect(t, "UseDelta", 0.5, delta, err)

arch, err := h.Arch()
expect(t, "Architecture", "8086", arch, err)

Expand Down
54 changes: 54 additions & 0 deletions testdata/ci/pacman.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =

#NoUpgrade =
#NoExtract =

# Misc options
#UseSyslog
#Color
#TotalDownload
CheckSpace
#VerbosePkgLists

SigLevel = Never
LocalFileSigLevel = Optional

[testing]
Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

[community-testing]
Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

0 comments on commit c0e78c8

Please sign in to comment.