diff --git a/.travis.yml b/.travis.yml index cca2f3d..5ffeade 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,4 +39,4 @@ deploy: on: tags: true repo: appsody/controller - \ No newline at end of file + diff --git a/Dockerfile b/Dockerfile index 3567eef..6afc958 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM busybox -COPY ./setController.sh /setController.sh + COPY ./package/appsody-controller /appsody-controller -RUN chmod +x /setController.sh /appsody-controller -WORKDIR / \ No newline at end of file +RUN chmod +x /appsody-controller +WORKDIR / +CMD ["cp","/appsody-controller","/.appsody/appsody-controller"] \ No newline at end of file diff --git a/build.sh b/build.sh index b59e361..0837199 100755 --- a/build.sh +++ b/build.sh @@ -3,5 +3,5 @@ set -e echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin -docker build -t $DOCKER_ORG/appsody-controller:$TRAVIS_TAG -t $DOCKER_ORG/appsody-controller:latest . -docker push $DOCKER_ORG/appsody-controller \ No newline at end of file +docker build -t $DOCKER_ORG/init-controller:$TRAVIS_TAG -t $DOCKER_ORG/init-controller:latest . +docker push $DOCKER_ORG/init-controller diff --git a/setController.sh b/setController.sh deleted file mode 100755 index cc0b711..0000000 --- a/setController.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -set -e -VERSION=`/appsody-controller --version` -#echo Verifying presence of appsody-controller version $VERSION -set +e -DOWNLOAD=0 -if [ -f "/.appsody/appsody-controller" ]; then - #echo Controller found - checking version - CURRENT_VERSION=`/.appsody/appsody-controller --version` - if [ $? -eq 0 ]; then - #echo Found controller - version: $CURRENT_VERSION - if [ "$CURRENT_VERSION" != "$VERSION" ]; then - #echo Current controller version $CURRENT_VERSION does not match required version $VERSION - replacing controller... - DOWNLOAD=1 - fi - else - #echo Old controller failed to execute - replacing it... - DOWNLOAD=1 - fi -else - #echo No controller found - copying controller... - DOWNLOAD=1 -fi -if [ $DOWNLOAD = 1 ]; then - chmod +x appsody-controller - mv appsody-controller /.appsody - #echo Done! -fi -CURRENT_VERSION=`/.appsody/appsody-controller --version` -echo Controller version: $CURRENT_VERSION