Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Updated build (#15)
Browse files Browse the repository at this point in the history
Updated build to match appsody-buildah approach with CLI version and tag as params

Signed-off-by: Neeraj Laad <[email protected]>
  • Loading branch information
neeraj-laad authored and chilanti committed Sep 5, 2019
1 parent c2e135e commit 6acaf5a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ deploy:
branch: master
tags: true
provider: script
script: bash ./docker-build.sh
script: bash ./build.sh $CLI_VERSION $TRAVIS_TAG
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
FROM gcr.io/cloud-builders/docker

RUN apt-get update && \
apt-get -y install sudo jq wget
RUN wget https://github.com/appsody/appsody/releases/download/0.4.0/appsody_0.4.0_amd64.deb

ARG CLI_VERSION
RUN wget https://github.com/appsody/appsody/releases/download/$CLI_VERSION/appsody_$CLI_VERSION_amd64.deb
RUN apt install -f ./appsody_$CLI_VERSION_amd64.deb

COPY setupAndRunExtract.sh .
RUN apt install -f ./appsody_0.4.0_amd64.deb
RUN chmod +x setupAndRunExtract.sh
10 changes: 10 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

#Takes two parms:
#CLI_VERSION
#TRAVIS_TAG

set -e
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker build -t $DOCKER_ORG/appsody-docker:$2 -t $DOCKER_ORG/appsody-docker:latest --build-arg CLI_VERSION=$1 .
docker push $DOCKER_ORG/appsody-docker
5 changes: 0 additions & 5 deletions docker-build.sh

This file was deleted.

0 comments on commit 6acaf5a

Please sign in to comment.