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

Commit

Permalink
Appsody buildah CI enablement (#3)
Browse files Browse the repository at this point in the history
* CI enablement

* Eliminated sed for --build-arg

* Fixed typo (missing $)
  • Loading branch information
chilanti authored and neeraj-laad committed Sep 5, 2019
1 parent 174b12d commit c61f96e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: bash
os:
- linux
services:
- docker
deploy:
on:
branch: master
tags: true
provider: script
script: bash ./build.sh $CLI_VERSION $TRAVIS_TAG
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RUN yum -y update && \
yum -y install wget
# Matching appsody binary does not exist in upstream.
# Provide the proper version once it is available.
RUN wget https://github.com/appsody/appsody/releases/download/0.X.0/appsody-0.X.0-1.x86_64.rpm
RUN yum localinstall -y ./appsody-0.X.0-1.x86_64.rpm
ARG CLI_VERSION
RUN wget https://github.com/appsody/appsody/releases/download/$CLI_VERSION/appsody-$CLI_VERSION-1.x86_64.rpm
RUN yum localinstall -y ./appsody-$CLI_VERSION-1.x86_64.rpm
RUN chmod +x extract.sh
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
#Takes two parms:
#CLI_VERSION
#TRAVIS_TAG
set -e
#sed -i "s/CLI_VERSION/$1/g" ./Dockerfile
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker build -t $DOCKER_ORG/appsody-buildah:$2 --build-arg CLI_VERSION=$1 .
docker push $DOCKER_ORG/appsody-buildah:$2

0 comments on commit c61f96e

Please sign in to comment.