From 2722948e924e4f539ed4d52de20233f4e90cb6cb Mon Sep 17 00:00:00 2001 From: erkin97 Date: Sun, 1 Jul 2018 22:38:12 +0600 Subject: [PATCH 01/13] update info plist --- Info.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Info.plist b/Info.plist index 10756088..21cd1414 100644 --- a/Info.plist +++ b/Info.plist @@ -17,9 +17,9 @@ CFBundleIdentifier com.subutai-io.SubutaiControlCenter CFBundleVersion - 7.0.1 + 7.1.2 CFBundleShortVersionString - 7.0.1 + 7.1.2 LSUIElement 1 From 8405ed5ecf7e803e9065f4b9804a6e21cad065c1 Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 15:52:19 +0600 Subject: [PATCH 02/13] test tag build --- .travis.yml | 1 + upload.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 735e1e0d..e9eb27fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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= diff --git a/upload.sh b/upload.sh index 9e66d688..8015cf5a 100755 --- a/upload.sh +++ b/upload.sh @@ -73,14 +73,14 @@ case $BRANCH in head) PKGNAME="subutai-control-center$PKG_EXT" BINNAME="SubutaiControlCenter$BINARY_EXT" - URL=https://cdn.subutai.io:8338/kurjun/rest + URL=https://devcdn.subutai.io:8338/kurjun/rest upload_cdn subutai_control_center_bin/$PKGNAME $URL upload_cdn subutai_control_center_bin/$BINNAME $URL ;; HEAD) PKGNAME="subutai-control-center$PKG_EXT" BINNAME="SubutaiControlCenter$BINARY_EXT" - URL=https://cdn.subutai.io:8338/kurjun/rest + URL=https://devcdn.subutai.io:8338/kurjun/rest upload_cdn subutai_control_center_bin/$PKGNAME $URL upload_cdn subutai_control_center_bin/$BINNAME $URL ;; @@ -91,4 +91,4 @@ echo $PKGNAME echo $BINNAME echo $OS echo $BRANCH -echo "---------" \ No newline at end of file +echo "---------" From 2e0fded3271599e6f60ac2e7a49eeab11bb08c7e Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 16:28:33 +0600 Subject: [PATCH 03/13] upload .app file to dev --- upload_app.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 upload_app.sh diff --git a/upload_app.sh b/upload_app.sh new file mode 100755 index 00000000..8ea7c4e0 --- /dev/null +++ b/upload_app.sh @@ -0,0 +1,47 @@ +tar czf SubutaiControlCenter.tar.gz ./subutai_control_center/SubutaiControlCenter.app +echo "Uploading SubutaiControlCenter.app" +BRANCH=HEAD +FILE="" +URL="" +USER=jenkins +EMAIL=jenkins@subut.ai + +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="SubutaiControlCenter.tar.gz" +URL=https://devcdn.subutai.io:8338/kurjun/rest +upload_cdn subutai_control_center_bin/$FILE $URL +;; + +echo "---------" +ECHO $FILE +echo $OS +echo $BRANCH +echo "---------" From d6edde938825342e5413cebfda04b0fd581277db Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 16:40:55 +0600 Subject: [PATCH 04/13] upload .app to cdn --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e9eb27fd..c3f4388e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,7 +67,9 @@ matrix: on: branch: master - provider: script - script: bash upload.sh HEAD + script: + - bash upload.sh HEAD + - bash upload_app.sh skip_cleanup: true on: tags: true From 9439a5c0b05b91337b4d49288bf878894aab8e71 Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 16:59:41 +0600 Subject: [PATCH 05/13] specify correct path --- upload_app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload_app.sh b/upload_app.sh index 8ea7c4e0..6eb4ae07 100755 --- a/upload_app.sh +++ b/upload_app.sh @@ -1,4 +1,4 @@ -tar czf SubutaiControlCenter.tar.gz ./subutai_control_center/SubutaiControlCenter.app +tar czf SubutaiControlCenter.tar.gz ./subutai_control_center_dev/SubutaiControlCenter.app echo "Uploading SubutaiControlCenter.app" BRANCH=HEAD FILE="" From 192cd204d4caacc5f95676337d1444b68e92dd7f Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 17:00:41 +0600 Subject: [PATCH 06/13] fix upload file path --- upload_app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload_app.sh b/upload_app.sh index 6eb4ae07..8ce96e81 100755 --- a/upload_app.sh +++ b/upload_app.sh @@ -37,7 +37,7 @@ upload_cdn (){ } FILE="SubutaiControlCenter.tar.gz" URL=https://devcdn.subutai.io:8338/kurjun/rest -upload_cdn subutai_control_center_bin/$FILE $URL +upload_cdn $FILE $URL ;; echo "---------" From 31e5d015b796b24cd47dc4abb79232b57e1ec9d4 Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 17:09:10 +0600 Subject: [PATCH 07/13] use multiple scripts --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c3f4388e..bb6da661 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,7 +66,6 @@ matrix: skip_cleanup: true on: branch: master - - provider: script script: - bash upload.sh HEAD - bash upload_app.sh From 18d92118c0f6eecae2df203b42c6b4ae15e0fa87 Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 17:29:38 +0600 Subject: [PATCH 08/13] some fixes in script and travis --- .travis.yml | 5 ++--- upload_app.sh | 9 ++++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index bb6da661..237aba55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,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 + - sudo /Users/travis/build/subutai-io/control-center/upload_app.sh $TRAVIS_BRANCH - ls subutai_control_center_bin deploy: - provider: script @@ -66,9 +67,7 @@ matrix: skip_cleanup: true on: branch: master - script: - - bash upload.sh HEAD - - bash upload_app.sh + script: bash upload.sh HEAD skip_cleanup: true on: tags: true diff --git a/upload_app.sh b/upload_app.sh index 8ce96e81..b6fd0b54 100755 --- a/upload_app.sh +++ b/upload_app.sh @@ -1,6 +1,6 @@ -tar czf SubutaiControlCenter.tar.gz ./subutai_control_center_dev/SubutaiControlCenter.app +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=HEAD +BRANCH=$1 FILE="" URL="" USER=jenkins @@ -35,9 +35,12 @@ upload_cdn (){ echo -e "\\nCompleted" } -FILE="SubutaiControlCenter.tar.gz" +FILE="/Users/travis/build/subutai-io/control-center/SubutaiControlCenter.tar.gz" URL=https://devcdn.subutai.io:8338/kurjun/rest +if [[ $BRANCH = "HEAD" ]] || [[ $BRANCH = "head" ]] +then upload_cdn $FILE $URL +fi ;; echo "---------" From a9329f9d170bb93277c6844114857583950efe68 Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 17:31:57 +0600 Subject: [PATCH 09/13] add script provider --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 237aba55..5d9e35d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,6 +67,7 @@ matrix: skip_cleanup: true on: branch: master + - provider: script script: bash upload.sh HEAD skip_cleanup: true on: From ce62aa47e91818ea42b4264a7ed658198c773aff Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 17:41:30 +0600 Subject: [PATCH 10/13] remove bad character --- upload_app.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/upload_app.sh b/upload_app.sh index b6fd0b54..a0e8cad9 100755 --- a/upload_app.sh +++ b/upload_app.sh @@ -41,7 +41,6 @@ if [[ $BRANCH = "HEAD" ]] || [[ $BRANCH = "head" ]] then upload_cdn $FILE $URL fi -;; echo "---------" ECHO $FILE From 41ff80e2a393c2b0eabc1f1b666bc5602ca617fe Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 17:57:27 +0600 Subject: [PATCH 11/13] fix upload --- upload_app.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/upload_app.sh b/upload_app.sh index a0e8cad9..848c5964 100755 --- a/upload_app.sh +++ b/upload_app.sh @@ -37,13 +37,12 @@ upload_cdn (){ } FILE="/Users/travis/build/subutai-io/control-center/SubutaiControlCenter.tar.gz" URL=https://devcdn.subutai.io:8338/kurjun/rest -if [[ $BRANCH = "HEAD" ]] || [[ $BRANCH = "head" ]] +if [[ $BRANCH != "master" ]] && [[ $BRANCH != "head" ]] then upload_cdn $FILE $URL fi echo "---------" -ECHO $FILE -echo $OS +echo $FILE echo $BRANCH echo "---------" From e6168f63b8406bb0e26ab1570c03701ec458bbd9 Mon Sep 17 00:00:00 2001 From: erkin97 Date: Mon, 2 Jul 2018 18:12:09 +0600 Subject: [PATCH 12/13] upload only linux release --- .travis.yml | 2 +- upload.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d9e35d2..48c53814 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +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 - - sudo /Users/travis/build/subutai-io/control-center/upload_app.sh $TRAVIS_BRANCH + - /Users/travis/build/subutai-io/control-center/upload_app.sh $TRAVIS_BRANCH - ls subutai_control_center_bin deploy: - provider: script diff --git a/upload.sh b/upload.sh index 8015cf5a..30ab5713 100755 --- a/upload.sh +++ b/upload.sh @@ -73,16 +73,22 @@ case $BRANCH in head) PKGNAME="subutai-control-center$PKG_EXT" BINNAME="SubutaiControlCenter$BINARY_EXT" - URL=https://devcdn.subutai.io:8338/kurjun/rest + 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" - URL=https://devcdn.subutai.io:8338/kurjun/rest + 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 From 9655a2f57f226410cda081d0a46fffef7802f549 Mon Sep 17 00:00:00 2001 From: erkin97 Date: Tue, 3 Jul 2018 09:44:57 +0600 Subject: [PATCH 13/13] upload app only for head --- upload_app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload_app.sh b/upload_app.sh index 848c5964..e86be919 100755 --- a/upload_app.sh +++ b/upload_app.sh @@ -37,7 +37,7 @@ upload_cdn (){ } FILE="/Users/travis/build/subutai-io/control-center/SubutaiControlCenter.tar.gz" URL=https://devcdn.subutai.io:8338/kurjun/rest -if [[ $BRANCH != "master" ]] && [[ $BRANCH != "head" ]] +if [[ $BRANCH != "master" ]] && [[ $BRANCH != "dev" ]] then upload_cdn $FILE $URL fi