Compare commits

...

26 Commits

Author SHA1 Message Date
KatKatKateryna c4d5bda9f8 Merge pull request #78 from specklesystems/JR-Morgan-patch-1
Update config.yml
2024-03-14 19:31:11 +08:00
Jedd Morgan 44177eaac8 Update config.yml 2024-03-14 11:16:04 +00:00
Jedd Morgan 71045d4424 feat(ci): [CNX-9126] Update to digicert-keylocker (#77)
* feat(ci): Update to digicert-keylocker

* removed pem
2024-03-11 17:15:14 +01:00
KatKatKateryna 60ba2f3e90 Revert "add github token"
This reverts commit 50fa347d1c.
2024-03-06 08:31:09 +00:00
KatKatKateryna 50fa347d1c add github token 2024-03-05 09:10:19 +00:00
KatKatKateryna 5976a71405 Merge pull request #76 from specklesystems/certificates
naming
2024-02-29 00:33:14 +08:00
KatKatKateryna 0630556745 naming 2024-02-28 16:33:26 +00:00
KatKatKateryna b34609ed77 remove cmd shell 2024-02-26 22:01:56 +00:00
KatKatKateryna 2d9690514b Merge pull request #75 from specklesystems/certificates
remove cmd shell
2024-02-27 06:01:42 +08:00
KatKatKateryna c4127e731d Merge pull request #74 from specklesystems/certificates
new certificate signing
2024-02-27 01:00:22 +08:00
KatKatKateryna 9be3f399b5 new certificate signing 2024-02-26 12:37:57 +00:00
KatKatKateryna fa662725af Merge pull request #73 from specklesystems/2.18
ignore globally installed packages for venv installation
2024-02-19 21:42:17 +08:00
KatKatKateryna eec5c52257 ignore globally installed packages for venv installation 2024-02-19 13:36:05 +00:00
KatKatKateryna c7f64929d4 Merge pull request #72 from specklesystems/2.18
remove build filters from yaml; attach workspace before cloning UI
2024-02-15 23:27:28 +08:00
KatKatKateryna aa2a18e6c5 . 2024-02-15 15:26:15 +00:00
KatKatKateryna fe16c764a0 specify full path 2024-02-15 15:20:06 +00:00
KatKatKateryna 92a1b5adc6 don't create directory 2024-02-15 15:17:52 +00:00
KatKatKateryna 5f1a5885d5 remove build filters from yaml; attach workspace before cloning UI 2024-02-15 15:16:13 +00:00
KatKatKateryna b6c632baad Merge pull request #71 from specklesystems/2.18
typo
2024-02-15 23:10:40 +08:00
KatKatKateryna 0cf331fa0c typo 2024-02-15 15:09:18 +00:00
KatKatKateryna 4e554ec323 Merge pull request #70 from specklesystems/2.18
place UI folder in a correct location
2024-02-15 23:02:58 +08:00
KatKatKateryna 555059f3a7 place UI folder in a correct location 2024-02-15 15:02:33 +00:00
KatKatKateryna 6e7841ec25 missing module 2024-02-15 14:24:00 +00:00
KatKatKateryna 98bb190102 Merge pull request #69 from specklesystems/2.18
missing module
2024-02-15 22:23:57 +08:00
KatKatKateryna 72b49e6cf9 Merge pull request #68 from specklesystems/2.18
ci - install setuptools
2024-02-15 21:21:54 +08:00
KatKatKateryna afbaab673d ci - install setuptools 2024-02-15 13:21:45 +00:00
6 changed files with 104 additions and 44 deletions
+53 -28
View File
@@ -33,33 +33,34 @@ jobs:
docker:
- image: cimg/base:2021.01
steps:
- checkout
- attach_workspace:
at: ./
- add_ssh_keys:
fingerprints:
- "d1:d5:96:4d:ed:58:6e:7f:58:cc:21:5f:94:20:76:49"
- run:
name: I know Github as a host
command: |
mkdir ~/.ssh
touch ~/.ssh/known_hosts
ssh-keyscan github.com >> ~/.ssh/known_hosts
- run:
name: Clone
command: |
git clone git@github.com:specklesystems/specklepy_qt_ui.git specklepy_qt_ui
git clone git@github.com:specklesystems/specklepy_qt_ui.git speckle_toolbox/esri/toolboxes/speckle/specklepy_qt_ui
- run:
name: Remove Git Artifacts
command: |
rm -rf ./specklepy_qt_ui/.git/
rm ./specklepy_qt_ui/.gitignore
rm -rf ./speckle_toolbox/esri/toolboxes/speckle/specklepy_qt_ui/.git/
rm ./speckle_toolbox/esri/toolboxes/speckle/specklepy_qt_ui/.gitignore
- persist_to_workspace:
root: ./
paths:
- specklepy_qt_ui
- speckle_toolbox/esri/toolboxes/speckle/specklepy_qt_ui
build-connector-win: # Reusable job for basic connectors
executor:
name: win/default # comes with python 3.7.3
shell: cmd.exe
parameters:
slug:
type: string
@@ -71,12 +72,6 @@ jobs:
- checkout
- attach_workspace:
at: ./
- run:
name: Create Innosetup signing cert
shell: powershell.exe
command: |
echo $env:PFX_B64 > "speckle-sharp-ci-tools\SignTool\AEC Systems Ltd.txt"
certutil -decode "speckle-sharp-ci-tools\SignTool\AEC Systems Ltd.txt" "speckle-sharp-ci-tools\SignTool\AEC Systems Ltd.pfx"
- run:
name: Patch
shell: powershell.exe
@@ -88,14 +83,49 @@ jobs:
$version = "$($ver).$($env:CIRCLE_BUILD_NUM)"
echo $semver
python patch_version.py $semver
pip install setuptools
python setup.py sdist bdist_wheel
Copy-Item -Path "dist\speckle_toolbox-$($ver)-py3-none-any.whl" -Destination "speckle_arcgis_installer"
- run:
name: Build Installer
shell: cmd.exe
command:
| # If no tag, use 0.0.0.1 and don't make any YML (for testing only!)
speckle-sharp-ci-tools\InnoSetup\ISCC.exe speckle-sharp-ci-tools\arcgis.iss /Sbyparam=$p
- run:
name: Exit if External PR
shell: bash.exe
command: if [ "$CIRCLE_PR_REPONAME" ]; then circleci-agent step halt; fi
- unless: # Build installers unsigned on non-tagged builds
condition: << pipeline.git.tag >>
steps:
- run:
name: Build Installer
shell: cmd.exe #does not work in powershell
command:
speckle-sharp-ci-tools\InnoSetup\ISCC.exe speckle-sharp-ci-tools\arcgis.iss /Sbyparam=$p
- when: # Setup certificates and build installers signed for tagged builds
condition: << pipeline.git.tag >>
steps:
- run: # Installs digicert signing tools for windows
name: "Digicert Signing Manager Setup"
command: |
cd C:\
curl.exe -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:$env:SM_API_KEY" -o smtools-windows-x64.msi
msiexec.exe /i smtools-windows-x64.msi /quiet /qn | Wait-Process
- run: # Creates the Auth cert and the signing public PEM cert
name: Create Auth & OV Signing Cert
command: |
cd C:\
echo $env:SM_CLIENT_CERT_FILE_B64 > certificate.txt
certutil -decode certificate.txt certificate.p12
- run: # Syncs certificates from Digicert into local user store
name: Sync Certs
command: |
& $env:SSM\smksp_cert_sync.exe
- run:
name: Build Installer
shell: cmd.exe
command:
| # If no tag, use 0.0.0.1 and don't make any YML (for testing only!)
speckle-sharp-ci-tools\InnoSetup\ISCC.exe speckle-sharp-ci-tools\arcgis.iss /Sbyparam=$p /DSIGN_INSTALLER /DCODE_SIGNING_CERT_FINGERPRINT=%SM_CODE_SIGNING_CERT_SHA1_HASH%
- when:
condition: << parameters.installer >>
steps:
@@ -104,6 +134,8 @@ jobs:
paths:
- speckle-sharp-ci-tools/Installers
- speckle_arcgis_installer
environment:
SSM: 'C:\Program Files\DigiCert\DigiCert One Signing Manager Tools'
publish-github-release:
docker:
@@ -149,20 +181,13 @@ workflows: #happens with every PR to main
jobs:
- get-ui:
context: github-dev-bot
filters: &build_filters
branches:
only:
- main
- /ci\/.*/
- get-ci-tools:
context: github-dev-bot
filters: *build_filters
- build-connector-win:
requires:
- get-ui
- get-ci-tools
filters: *build_filters
context: innosetup
context: digicert-keylocker
deploy: # build installers and deploy
jobs:
@@ -186,7 +211,7 @@ workflows: #happens with every PR to main
- get-ui
- get-ci-tools
filters: *deploy_filters
context: innosetup
context: digicert-keylocker
- publish-github-release:
requires:
- build-deploy-connector-win
@@ -199,4 +224,4 @@ workflows: #happens with every PR to main
requires:
- build-deploy-connector-win
filters: *deploy_filters
context: do-spaces-speckle-releases
context: do-spaces-speckle-releases
+8
View File
@@ -1,3 +1,11 @@
import os
import subprocess
pythonExec = os.environ["ProgramFiles"]+ r"\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe"
result = subprocess.run([pythonExec, "-m", "pip", "install", "--upgrade", "--ignore-installed", "specklepy==2.17.17"], capture_output=True, text=True, shell=True, timeout=1000)
result = subprocess.run([pythonExec, "-m", "pip", "install", "--upgrade", "--ignore-installed", "panda3d==1.10.11"], capture_output=True, text=True, shell=True, timeout=1000)
result = subprocess.run([pythonExec, "-m", "pip", "install", "--upgrade", "--ignore-installed", "PyQt5==5.15.9"], capture_output=True, text=True, shell=True, timeout=1000)
from arcpy._mp import ArcGISProject, Map, Layer as arcLayer
import arcpy
+4 -2
View File
@@ -1,2 +1,4 @@
try: from speckle.speckle_arcgis import *
except: from speckle_toolbox.esri.toolboxes.speckle.speckle_arcgis import *
try:
from speckle.speckle.speckle_arcgis import *
except:
from speckle_toolbox.esri.toolboxes.speckle.speckle_arcgis import *
@@ -181,7 +181,14 @@ def installDependencies(pythonExec: str, pkgName: str, pkgVersion: str):
print(f"Installing {pkgName} to {pythonExec}")
# subprocess_call( [pythonExec, "-m", "pip", "uninstall", f"{pkgName}"])
subprocess_call(
[pythonExec, "-m", "pip", "install", f"{pkgName}=={pkgVersion}"]
[
pythonExec,
"-m",
"pip",
"install",
"--ignore-installed",
f"{pkgName}=={pkgVersion}",
]
)
elif pkgName == "panda3d":
import panda3d
@@ -191,7 +198,14 @@ def installDependencies(pythonExec: str, pkgName: str, pkgVersion: str):
):
print(f"Installing {pkgName} to {pythonExec}")
subprocess_call(
[pythonExec, "-m", "pip", "install", f"{pkgName}=={pkgVersion}"]
[
pythonExec,
"-m",
"pip",
"install",
"--ignore-installed",
f"{pkgName}=={pkgVersion}",
]
)
elif pkgName == "PyQt5":
import PyQt5
@@ -201,7 +215,14 @@ def installDependencies(pythonExec: str, pkgName: str, pkgVersion: str):
):
print(f"Installing {pkgName} to {pythonExec}")
subprocess_call(
[pythonExec, "-m", "pip", "install", f"{pkgName}=={pkgVersion}"]
[
pythonExec,
"-m",
"pip",
"install",
"--ignore-installed",
f"{pkgName}=={pkgVersion}",
]
)
except Exception as e:
print(f"{pkgName} not installed")
+4 -2
View File
@@ -1,2 +1,4 @@
try: from speckle.speckle.speckle_arcgis import *
except: from speckle_toolbox.esri.toolboxes.speckle.speckle.speckle_arcgis import *
try:
from speckle.speckle.speckle_arcgis import *
except:
from speckle_toolbox.esri.toolboxes.speckle.speckle.speckle_arcgis import *
@@ -2199,15 +2199,17 @@ def addRasterMainThread(obj: Tuple):
print(e)
# report on receive:
try:
layerName = newName.split(shortName)[0] + shortName # + ("_" + geom_print)
except:
layerName = newName
layerName = removeSpecialCharacters(layer.name)
shortName = newName.split(SYMBOL)[len(newName.split(SYMBOL)) - 1][:50]
finalName = shortName # + ("_" + geom_print)
try:
layerName = newName.split(shortName)[0] + shortName + "_Speckle"
except:
layerName = newName + "_Speckle"
finalName = shortName + "_Speckle"
dataStorage.latestActionLayers.append(finalName)
layerName = removeSpecialCharacters(layer.name) + "_Speckle"
rasterHasSr = False
p: str = (
@@ -2328,7 +2330,7 @@ def addRasterMainThread(obj: Tuple):
rasterLayer = arcpy.management.MakeRasterLayer(
full_path, "x" + str(random.randint(100000, 500000))
).getOutput(0)
rasterLayer.name = newName
rasterLayer.name = finalName
active_map.addLayerToGroup(layerGroup, rasterLayer)
rl2 = None
@@ -2336,11 +2338,11 @@ def addRasterMainThread(obj: Tuple):
SYMBOL + SYMBOL, SYMBOL
)
for l in project.activeMap.listLayers():
if l.longName == newGroupName.replace(SYMBOL, "\\") + newName:
if l.longName == newGroupName.replace(SYMBOL, "\\") + finalName:
rl2 = l
break
rasterLayer = rasterRendererToNative(
project, active_map, layerGroup, layer, rl2, rasterPathsToMerge, newName
project, active_map, layerGroup, layer, rl2, rasterPathsToMerge, finalName
)
try: