Skip to content

Commit

Permalink
Merge pull request #1302 from subutai-io/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
crioto authored Jul 3, 2018
2 parents c490bd1 + c7dc159 commit 7c7fff9
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ branches:
only:
- master
- dev
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
env:
global:
- secure: MF4u+11dbLkxvSiffBatl6627SrGEHM6l9YOvf+xLDLu2lfKmcNBUPRe2C/f1U5cwe33UIQynXti+3Y2ro0DyvNU1fZ7PVg4tEx5EjK4aSx5YAg8F2vbdS5v6kTRefBpwg70Apxjt7ZDGr4CPbcLMgZYA9vZizoKkoM/xBgOPftBE/lVa7cDKYwpOtq1vvaiIcttCOea3VNgA//M1Kpf+xAO0h2OFP3a1hTMHTzCYPHbfpCf3LfWQPifEfn252RKG3ewOowbCuuUj78tBqKOryrx9w1kbxvIdJUXbgRvliCQZ9s6/cR1fufGkNQiaAEzsaipTeQ4XdLWC950FBjhBelnNe58uNmGAKfS+zdqbXnx0/Cr9uIFjzqoGHs1pqSZFEm118i7khjcaGwlfAZdeGVbsXmv8/QGuwrfAoTZE1R8j925goKvztNZy+TSGu0wHsewlZOdCmYU5tIzdPCBAEOBm2YUmPmX5BmDhQVZAx0nL1wsmBjaMxejrcIvR+IQjiSbFQBYA6nTb1J0u6UckWT2WgI/iKEN4OhZnjYT7QhxJLjEEE20C2RWZS9u596ufUAtYchcpRn1matJhdekbKwBSDQWhU4ALl+PcVjFfahYmX3qCOFJiigP7aeENG+FEPoguiMI308rtAx5WGbzOHyz2LkRv9ep83PSja8PX1o=
Expand Down Expand Up @@ -53,6 +54,7 @@ matrix:
- wget -nv -O /Users/dev/Qt5.9.2.tar.gz https://cdn.subutai.io:8338/kurjun/rest/raw/download?name=Qt5.9.2.tar.gz && tar -xf /Users/dev/Qt5.9.2.tar.gz -C /Users/dev
- wget -nv -O /Users/travis/build/subutai-io/control-center/libs.tar.gz https://cdn.subutai.io:8338/kurjun/rest/raw/download?name=libs.tar.gz && tar -xf libs.tar.gz
- sudo /Users/travis/build/subutai-io/control-center/./build_mac.sh $TRAVIS_BRANCH
- /Users/travis/build/subutai-io/control-center/upload_app.sh $TRAVIS_BRANCH
- ls subutai_control_center_bin
deploy:
- provider: script
Expand Down
4 changes: 2 additions & 2 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundleIdentifier</key>
<string>com.subutai-io.SubutaiControlCenter</string>
<key>CFBundleVersion</key>
<string>7.0.1</string>
<string>7.1.2</string>
<key>CFBundleShortVersionString</key>
<string>7.0.1</string>
<string>7.1.2</string>
<key>LSUIElement</key>
<string>1</string>
</dict>
Expand Down
8 changes: 7 additions & 1 deletion upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,22 @@ case $BRANCH in
head)
PKGNAME="subutai-control-center$PKG_EXT"
BINNAME="SubutaiControlCenter$BINARY_EXT"
if [ $OS = Linux ]
then
URL=https://cdn.subutai.io:8338/kurjun/rest
upload_cdn subutai_control_center_bin/$PKGNAME $URL
upload_cdn subutai_control_center_bin/$BINNAME $URL
fi
;;
HEAD)
PKGNAME="subutai-control-center$PKG_EXT"
BINNAME="SubutaiControlCenter$BINARY_EXT"
if [ $OS = Linux ]
then
URL=https://cdn.subutai.io:8338/kurjun/rest
upload_cdn subutai_control_center_bin/$PKGNAME $URL
upload_cdn subutai_control_center_bin/$BINNAME $URL
fi
;;
esac

Expand All @@ -91,4 +97,4 @@ echo $PKGNAME
echo $BINNAME
echo $OS
echo $BRANCH
echo "---------"
echo "---------"
48 changes: 48 additions & 0 deletions upload_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
tar czf /Users/travis/build/subutai-io/control-center/SubutaiControlCenter.tar.gz /Users/travis/build/subutai-io/control-center/subutai_control_center_bin/SubutaiControlCenter.app
echo "Uploading SubutaiControlCenter.app"
BRANCH=$1
FILE=""
URL=""
USER=jenkins
[email protected]

upload_cdn (){
echo "Obtaining auth id..."

curl -k "$2/auth/token?user=$USER" -o /tmp/filetosign
rm -rf /tmp/filetosign.asc
gpg --armor -u $EMAIL --clearsign /tmp/filetosign

SIGNED_AUTH_ID=$(cat /tmp/filetosign.asc)

echo "Auth id obtained and signed\\n$SIGNED_AUTH_ID"

TOKEN=$(curl -k -s -Fmessage="$SIGNED_AUTH_ID" -Fuser=$USER "$2/auth/token")

echo "Token obtained $TOKEN"

echo "Uploading file..."

ID=$(curl -sk -H "token: $TOKEN" -Ffile=@$1 -Ftoken=$TOKEN "$2/raw/upload")

echo "File uploaded with ID $ID"
echo "URL: $2"
echo "Signing file..."

SIGN=$(echo $ID | gpg --clearsign --no-tty -u $EMAIL)

curl -ks -Ftoken="$TOKEN" -Fsignature="$SIGN" "$2/auth/sign"

echo -e "\\nCompleted"
}
FILE="/Users/travis/build/subutai-io/control-center/SubutaiControlCenter.tar.gz"
URL=https://devcdn.subutai.io:8338/kurjun/rest
if [[ $BRANCH != "master" ]] && [[ $BRANCH != "dev" ]]
then
upload_cdn $FILE $URL
fi

echo "---------"
echo $FILE
echo $BRANCH
echo "---------"

0 comments on commit 7c7fff9

Please sign in to comment.