From 735e37189fa6d50132ec28eb560fa0d6dcecee2e Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Thu, 4 Apr 2019 14:45:57 -0400 Subject: [PATCH 1/3] Fix Azure Linux packaging --- build/azure-pipelines.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index d159604..e5fad30 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -11,10 +11,15 @@ pool: steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '3.7' - architecture: 'x64' +- script: | + git submodule init + git submodule update + displayName: 'Download Git submodules' + +- script: | + sudo apt-get update + sudo apt-get install -y python3 python3-dev python3-pip python3-venv + displayName: 'Install OS packages' - task: NodeTool@0 inputs: @@ -22,13 +27,11 @@ steps: displayName: 'Install Node.js' - script: | - git submodule init - git submodule update - displayName: 'Download Git submodules' - -- script: | - python -m pip install -r server/requirements.txt - python -m pip install pyinstaller + python3 -m venv ./venv + ./venv/bin/python -m pip install --upgrade pip + ./venv/bin/python -m pip install --upgrade setuptools + ./venv/bin/python -m pip install -r server/requirements.txt + ./venv/bin/python -m pip install pyinstaller displayName: 'Install Python build dependencies' - script: | @@ -37,7 +40,8 @@ steps: displayName: 'npm install and build' - script: | - pyinstaller build/glance-vessels-onefile.spec + source ./venv/bin/activate + ./venv/bin/pyinstaller build/glance-vessels-onefile.spec cp ./dist/glance-vessels ./dist/glance-vessels.linux.x86_64 displayName: 'Package' From 00426356f1343dab3aeee0d9632150bb4a95339d Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Thu, 4 Apr 2019 16:26:43 -0400 Subject: [PATCH 2/3] Add Azure macOS configuration --- build/azure-pipelines.yml | 132 +++++++++++++++++++++++++------------- 1 file changed, 89 insertions(+), 43 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index e5fad30..17f6e7e 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -6,46 +6,92 @@ trigger: - master -pool: - vmImage: 'Ubuntu-16.04' - -steps: - -- script: | - git submodule init - git submodule update - displayName: 'Download Git submodules' - -- script: | - sudo apt-get update - sudo apt-get install -y python3 python3-dev python3-pip python3-venv - displayName: 'Install OS packages' - -- task: NodeTool@0 - inputs: - versionSpec: '10.x' - displayName: 'Install Node.js' - -- script: | - python3 -m venv ./venv - ./venv/bin/python -m pip install --upgrade pip - ./venv/bin/python -m pip install --upgrade setuptools - ./venv/bin/python -m pip install -r server/requirements.txt - ./venv/bin/python -m pip install pyinstaller - displayName: 'Install Python build dependencies' - -- script: | - npm install - npm run build:release - displayName: 'npm install and build' - -- script: | - source ./venv/bin/activate - ./venv/bin/pyinstaller build/glance-vessels-onefile.spec - cp ./dist/glance-vessels ./dist/glance-vessels.linux.x86_64 - displayName: 'Package' - -- task: PublishPipelineArtifact@0 - inputs: - artifactName: 'Linux' - targetPath: './dist/glance-vessels.linux.x86_64' +jobs: + +- job: 'Linux' + pool: + vmImage: 'Ubuntu-16.04' + + steps: + - script: | + git submodule init + git submodule update + displayName: 'Download Git submodules' + + - script: | + sudo apt-get update + sudo apt-get install -y python3 python3-dev python3-pip python3-venv + displayName: 'Install OS packages' + + - task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + + - script: | + python3 -m venv ./venv + ./venv/bin/python -m pip install --upgrade pip + ./venv/bin/python -m pip install --upgrade setuptools + ./venv/bin/python -m pip install -r server/requirements.txt + ./venv/bin/python -m pip install pyinstaller + displayName: 'Install Python build dependencies' + + - script: | + npm install + npm run build:release + displayName: 'npm install and build' + + - script: | + source ./venv/bin/activate + ./venv/bin/pyinstaller build/glance-vessels-onefile.spec + cp ./dist/glance-vessels ./dist/glance-vessels.linux.x86_64 + displayName: 'Package' + + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'Linux' + targetPath: './dist/glance-vessels.linux.x86_64' + +- job: 'macOS' + pool: + vmImage: 'macos-10.13' + + steps: + - script: | + git submodule init + git submodule update + displayName: 'Download Git submodules' + + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.5' + architecture: 'x64' + + - task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + + - script: | + python3 -m venv ./venv + ./venv/bin/python -m pip install --upgrade pip + ./venv/bin/python -m pip install --upgrade setuptools + ./venv/bin/python -m pip install -r server/requirements.txt + ./venv/bin/python -m pip install pyinstaller + displayName: 'Install Python build dependencies' + + - script: | + npm install + npm run build:release + displayName: 'npm install and build' + + - script: | + source ./venv/bin/activate + ./venv/bin/pyinstaller build/glance-vessels-onefile.spec + cp ./dist/glance-vessels ./dist/glance-vessels.macos.x86_64 + displayName: 'Package' + + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'macOS' + targetPath: './dist/glance-vessels.macos.x86_64' From fd07d560fd7c2b8f693ad43f54d078c14e14f860 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Thu, 4 Apr 2019 16:59:36 -0400 Subject: [PATCH 3/3] Add Azure Windows configuration --- build/azure-pipelines.yml | 45 ++++++++++++++++++++++++++++++- build/glance-vessels-onefile.spec | 2 +- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 17f6e7e..0656add 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -93,5 +93,48 @@ jobs: - task: PublishPipelineArtifact@0 inputs: - artifactName: 'macOS' + artifactName: 'MacOS' targetPath: './dist/glance-vessels.macos.x86_64' + +- job: 'Windows' + pool: + vmImage: 'vs2017-win2016' + + steps: + - script: | + git submodule init + git submodule update + displayName: 'Download Git submodules' + + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + architecture: 'x64' + + - task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + + - script: | + python -m pip install --upgrade pip + python -m pip install --upgrade setuptools + python -m pip install -r server/requirements.txt + python -m pip install pyinstaller + python -m pip install pywin32 + displayName: 'Install Python build dependencies' + + - bash: | + npm install + npm run build:release + displayName: 'npm install and build' + + - bash: | + pyinstaller build/glance-vessels-onefile.spec + cp ./dist/glance-vessels.exe ./dist/glance-vessels.windows.x86_64.exe + displayName: 'Package' + + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'Windows' + targetPath: './dist/glance-vessels.windows.x86_64.exe' diff --git a/build/glance-vessels-onefile.spec b/build/glance-vessels-onefile.spec index 04cc642..ff754d1 100644 --- a/build/glance-vessels-onefile.spec +++ b/build/glance-vessels-onefile.spec @@ -18,7 +18,7 @@ block_cipher = None a = Analysis([os.path.join('..', entry_point)], pathex=[repo_dir], binaries=[], - datas=[(os.path.join('..', 'server', 'www'), 'www')], + datas=[('../server/www', 'www')], hiddenimports=[], hookspath=['./build/'], runtime_hooks=[],