Skip to content

Commit

Permalink
Merge pull request #18 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 1.4.1
  • Loading branch information
andyone authored Aug 2, 2019
2 parents c3c3889 + e393d62 commit 3a7c18b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
8 changes: 3 additions & 5 deletions bibop-massive
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ main() {
exit 0
fi

export LC_ALL=C

checkEnv
configureYUM
processRecipes "$@"
Expand Down Expand Up @@ -446,7 +444,7 @@ checkPackagesAvailability() {
fi

# shellcheck disable=SC2086
aval_list=$(yum -q $opts list availabile $pkg_list 2> /dev/null | grep -v 'Available Packages' | cut -f1 -d" " | sed 's:\..*::' | tr "\n" " " | sed 's/ $//')
aval_list=$(LC_ALL=C yum -q $opts list availabile $pkg_list 2> /dev/null | grep -v 'Available Packages' | cut -f1 -d" " | sed 's:\..*::' | tr "\n" " " | sed 's/ $//')

if [[ -z "$aval_list" ]] ; then
return 1
Expand Down Expand Up @@ -481,7 +479,7 @@ installPackages() {
echo -n > $YUM_LOG

# shellcheck disable=SC2086
yum -q -y $opts install "$@" &>/dev/null
LC_ALL=C yum -q -y $opts install "$@" &>/dev/null

if [[ $? -eq 0 ]] ; then
pkg_count=$(grep -c 'Installed:' $YUM_LOG)
Expand Down Expand Up @@ -534,7 +532,7 @@ cleanYumCache() {
fi

# shellcheck disable=SC2086
yum -q -y $opts clean expire-cache &>/dev/null
LC_ALL=C yum -q -y $opts clean expire-cache &>/dev/null
}

# Prints status bullet
Expand Down
16 changes: 14 additions & 2 deletions centos6.docker
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## BUILDER #####################################################################

FROM centos:6 as builder

RUN mkdir -p "/go/src" && chmod -R 777 "/go"
Expand All @@ -8,21 +10,31 @@ WORKDIR /go/src/github.com/essentialkaos/bibop

COPY . .

RUN yum -y -q install https://yum.kaos.st/6/release/x86_64/kaos-repo-9.1-0.el6.noarch.rpm && \
RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el6.noarch.rpm && \
yum -y -q install make golang git upx && \
make deps && \
make all && \
upx bibop

## FINAL IMAGE #################################################################

FROM centos:6

LABEL name="Bibop Image on CentOS 6" \
vendor="ESSENTIAL KAOS" \
maintainer="Anton Novojilov" \
license="EKOL" \
version="2019.08.02"

COPY --from=builder /go/src/github.com/essentialkaos/bibop/bibop /usr/bin/
COPY --from=builder /go/src/github.com/essentialkaos/bibop/bibop-entrypoint /usr/bin/

RUN yum -y -q install https://yum.kaos.st/6/release/x86_64/kaos-repo-9.1-0.el6.noarch.rpm && \
RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el6.noarch.rpm && \
yum -y -q install epel-release

VOLUME /bibop
WORKDIR /bibop

ENTRYPOINT ["bibop-entrypoint"]

################################################################################
16 changes: 14 additions & 2 deletions centos7.docker
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## BUILDER #####################################################################

FROM centos:7 as builder

RUN mkdir -p "/go/src" && chmod -R 777 "/go"
Expand All @@ -8,21 +10,31 @@ WORKDIR /go/src/github.com/essentialkaos/bibop

COPY . .

RUN yum -y -q install https://yum.kaos.st/7/release/x86_64/kaos-repo-9.1-0.el7.noarch.rpm && \
RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el7.noarch.rpm && \
yum -y -q install make golang git upx && \
make deps && \
make all && \
upx bibop

## FINAL IMAGE #################################################################

FROM centos:7

LABEL name="Bibop Image on CentOS 7" \
vendor="ESSENTIAL KAOS" \
maintainer="Anton Novojilov" \
license="EKOL" \
version="2019.08.02"

COPY --from=builder /go/src/github.com/essentialkaos/bibop/bibop /usr/bin/
COPY --from=builder /go/src/github.com/essentialkaos/bibop/bibop-entrypoint /usr/bin/

RUN yum -y -q install https://yum.kaos.st/7/release/x86_64/kaos-repo-9.1-0.el7.noarch.rpm && \
RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el7.noarch.rpm && \
yum -y -q install epel-release

VOLUME /bibop
WORKDIR /bibop

ENTRYPOINT ["bibop-entrypoint"]

################################################################################
2 changes: 1 addition & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
// Application info
const (
APP = "bibop"
VER = "1.4.0"
VER = "1.4.1"
DESC = "Utility for testing command-line tools"
)

Expand Down
6 changes: 3 additions & 3 deletions cli/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ func (e *Executor) Validate(r *recipe.Recipe, cfg *ValidationConfig) []error {
errs := errutil.NewErrors()

errs.Add(checkRecipeWorkingDir(r))
errs.Add(checkRecipeTags(r, cfg.Tags)...)
errs.Add(checkRecipeVariables(r)...)
errs.Add(checkRecipeTags(r, cfg.Tags))
errs.Add(checkRecipeVariables(r))

if !cfg.IgnorePrivileges {
errs.Add(checkRecipePrivileges(r))
}

if !cfg.IgnoreDependencies {
errs.Add(checkPackages(r)...)
errs.Add(checkPackages(r))
}

if !errs.HasErrors() {
Expand Down

0 comments on commit 3a7c18b

Please sign in to comment.