Skip to content

Commit

Permalink
Merge pull request #125 from lorengordon/docker-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lorengordon authored Jan 15, 2021
2 parents 472df2f + d77477d commit a01c0de
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.8.0
current_version = 0.8.1
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

### 0.8.1

**Released**: 2021.01.13

**Commit Delta**: [Change from 0.8.0 release](https://github.com/plus3it/tardigrade-ci/compare/0.8.0...0.8.1)

**Summary**:

* Runs auto-init in non-`tardigrade-ci` containers, so the make targets are available
* Ensures `$PWD` is always set, including when invoking the container directly
with `docker run`

### 0.8.0

**Released**: 2021.01.12
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ ARG PROJECT_NAME=tardigrade-ci
ARG GITHUB_ACCESS_TOKEN
ENV PATH="/root/.local/bin:/root/bin:/go/bin:/usr/local/go/bin:${PATH}"
ENV GOPATH=/go
COPY --from=golang /go/ /go/
COPY --from=golang /usr/local/go/ /usr/local/go/
COPY . /${PROJECT_NAME}
RUN apt-get update -y && apt-get install -y \
xz-utils \
curl \
jq \
unzip \
make \
&& rm -rf /var/lib/apt/lists/*
COPY --from=golang /go/ /go/
COPY --from=golang /usr/local/go/ /usr/local/go/
COPY . /${PROJECT_NAME}
RUN make -C /${PROJECT_NAME} install
&& make -C /${PROJECT_NAME} install \
&& touch /.dockerenv \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /${PROJECT_NAME}
ENTRYPOINT ["make"]
5 changes: 3 additions & 2 deletions bootstrap/Makefile.bootstrap
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export SHELL = /bin/bash
export PWD = $(shell pwd)
export TARDIGRADE_CI_ORG ?= plus3it
export TARDIGRADE_CI_PROJECT ?= tardigrade-ci
export TARDIGRADE_CI_BRANCH ?= $(or $(shell grep 'FROM $(TARDIGRADE_CI_ORG)/$(TARDIGRADE_CI_PROJECT)' Dockerfile 2> /dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' 2> /dev/null),master)
Expand Down Expand Up @@ -27,9 +28,9 @@ endef
# checkout does not match TARDIGRADE_CI_BRANCH
define $(TARDIGRADE_CI_PROJECT)/init
if [[ \
-f "/.dockerenv" \
-f "/.dockerenv" && -f "/$(TARDIGRADE_CI_PROJECT)/Makefile" \
]]; then \
echo "[bootstrap]: In docker container, skipping auto-init" ;\
echo "[bootstrap]: In $(TARDIGRADE_CI_PROJECT) docker container, skipping auto-init" ;\
elif [[ \
"$(TARDIGRADE_CI_PATH)" != "$(TARDIGRADE_CI_PATH_LOCAL)" && \
-f "$(TARDIGRADE_CI_MAKEFILE)" \
Expand Down

0 comments on commit a01c0de

Please sign in to comment.