socotra-build 0.3.24 → 0.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/socotra-build.rb +9 -1
- data/lib/tenant.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4def628cb039a01eb741fb791175b74fd963037a
|
|
4
|
+
data.tar.gz: 1bf5c0dd46af9efa764dc1a32aae3efe6ef9f698
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35f46fbb9bd68aed0e6aa1323c7a4ff0fbb3fca5535db6ec1c8b88ae98bc6d1a8c16e9359316379420ed154db0fc9156ccbc13760ccf0f82f98344a51771ed78
|
|
7
|
+
data.tar.gz: f4b37067851eb1a0887bf07429a77e7ba0f7f605670330f9f6bdd73f2d30e36ed2d55ede0f04e46005aaf42577325d7dd6678a92637cc3e17aad8fe0431b60f1
|
data/lib/socotra-build.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'open3'
|
|
2
2
|
require 'set'
|
|
3
|
+
require_relative 's3_uploader'
|
|
3
4
|
|
|
4
5
|
def self.safe_retry(cmd, description, error_message="command failed", raise_on_fail=true, log_level="ERROR", log=true, tries=3)
|
|
5
6
|
begin
|
|
@@ -131,6 +132,13 @@ def self.install_socotra_py_modules(pymodule, environment)
|
|
|
131
132
|
cmd = "sudo pip list |grep #{pymodule}; if [ $? -eq 0 ];then /usr/bin/yes|sudo pip uninstall #{pymodule};fi"
|
|
132
133
|
system_safe(cmd, "uninstall_#{pymodule}_py_module", "Failed to uninstall #{pymodule}")
|
|
133
134
|
|
|
134
|
-
cmd = "/usr/bin/yes|sudo pip install --trusted-host socotra-pypi-euw1.s3-website-eu-west-1.amazonaws.com --extra-index-url=http://socotra-pypi-euw1.s3-website-eu-west-1.amazonaws.com/#{pymodule}/#{environment} #{pymodule}"
|
|
135
|
+
cmd = "/usr/bin/yes|sudo pip install --egg --process-dependency-links --allow-external mysql-connector-python --trusted-host socotra-pypi-euw1.s3-website-eu-west-1.amazonaws.com --extra-index-url=http://socotra-pypi-euw1.s3-website-eu-west-1.amazonaws.com/#{pymodule}/#{environment} #{pymodule}"
|
|
135
136
|
system_safe(cmd, "install_#{pymodule}_py_module", "Failed to install #{pymodule}")
|
|
136
137
|
end
|
|
138
|
+
|
|
139
|
+
def self.sync_logs(repo, build_id)
|
|
140
|
+
cmd = "cp -f console.log logs/"
|
|
141
|
+
system_safe(cmd, "copy_console_log", "Failed to copy console log")
|
|
142
|
+
|
|
143
|
+
upload_to_s3("logs", "socotra-builds/#{repo}/#{build_id}")
|
|
144
|
+
end
|
data/lib/tenant.rb
CHANGED
|
@@ -84,7 +84,11 @@ def self.load_tabular_datasources(jwtsecret, api_url, apidoc_url, admin_username
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
def self.load_assets_from_branch(tenant_name, domain, admin_username, admin_password, api_url, apidoc_url)
|
|
87
|
-
|
|
87
|
+
if api_url == "https://api.staging.socotra.com"
|
|
88
|
+
cmd = "socotraadmin tenant add_tenant #{tenant_name} --overwrite_ontology --tenant_hostname=#{tenant_name}.co.#{domain} --tenant_path=. --admin_username=#{admin_username} --admin_password=#{admin_password} --apidoc_url=#{apidoc_url} --api_url=#{api_url}"
|
|
89
|
+
else
|
|
90
|
+
cmd = "socotraadmin tenant add_tenant #{tenant_name} --tenant_hostname=#{tenant_name}.co.#{domain} --tenant_path=. --admin_username=#{admin_username} --admin_password=#{admin_password} --apidoc_url=#{apidoc_url} --api_url=#{api_url}"
|
|
91
|
+
end
|
|
88
92
|
|
|
89
93
|
system_safe(cmd, "load_branch_assets_for_pr", "Failed to load prod asset for PR")
|
|
90
94
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: socotra-build
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.26
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Antenesse
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2017-03-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Common functions for build
|
|
14
14
|
email: chris.antenesse@socotra.com
|