ci(codebuil): fix the docker image

pull/25/head
Kevin Zhuang 4 years ago
parent f178c6f326
commit 563dca9b8d

@ -1,13 +1,9 @@
version: 0.2 version: 0.2
env: env:
variables:
COLUMNS: 80
parameter-store: parameter-store:
LOGIN_PASSWORD: /dotbare/dockerpassword LOGIN_PASSWORD: /dotbare/dockerpassword
LOGIN_USERNAME: /dotbare/dockerusername LOGIN_USERNAME: /dotbare/dockerusername
exported-variables:
- COLUMNS
phases: phases:
install: install:
@ -33,8 +29,9 @@ phases:
- docker container run -i --rm --name dotbare kazhala/dotbare:testbare - docker container run -i --rm --name dotbare kazhala/dotbare:testbare
- echo Building docker image ... - echo Building docker image ...
- |- - |-
DOTBARE_VERSION=$(./dotbare --version | awk -F ': v" '{print $2}') DOTBARE_VERSION=$(./dotbare --version | awk -F ": v" '{print $2}')
- docker image build -t kazhala/dotbare:latest -t kazhala/fzfaws:$DOTBARE_VERSION . - docker image build -t kazhala/dotbare:$DOTBARE_VERSION .
- docker image tag kazhala/dotbare:$DOTBARE_VERSION kazhala/dotbare:latest
post_build: post_build:
commands: commands:
- echo Deploying docker image ... - echo Deploying docker image ...

@ -1,6 +1,7 @@
FROM bats/bats:latest FROM bats/bats:latest
RUN apk add --no-cache git RUN apk add --no-cache git
RUN apk add --no-cache fzf RUN apk add --no-cache fzf
ENV COLUMNS=80
ADD ./ /root/dotbare ADD ./ /root/dotbare
RUN echo "source /root/dotbare/dotbare.plugin.bash" >> "$HOME"/.bashrc RUN echo "source /root/dotbare/dotbare.plugin.bash" >> "$HOME"/.bashrc
WORKDIR /root/dotbare WORKDIR /root/dotbare

Loading…
Cancel
Save