Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"isRoot": true,
"tools": {
"docfx": {
"version": "2.78.3",
"version": "2.78.4",
"commands": [
"docfx"
],
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.4.8",
"version": "5.5.1",
"commands": [
"reportgenerator"
],
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
]
# File header

file_header_template = \n Copyright (c) 2025, Salesforce, Inc.\n SPDX-License-Identifier: Apache-2\n \n Licensed under the Apache License, Version 2.0 (the "License") \n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n
file_header_template = \n Copyright (c) 2026, Salesforce, Inc.\n SPDX-License-Identifier: Apache-2\n \n Licensed under the Apache License, Version 2.0 (the "License") \n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n

#### Naming styles ####

Expand Down
6 changes: 6 additions & 0 deletions .github/.secrets.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is used to test github actions locally using act (https://github.com/nektos/act?tab=readme-ov-file)
# Copy/Paste and rename to .secrets and fill in the values
# Then use it via act cli or VSCode extension https://sanjulaganepola.github.io/github-local-actions-docs/

NUGET_PUBLISH_API_KEY=
PYPI_PUBLISH_USER_PASS=
38 changes: 38 additions & 0 deletions .github/.vars.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This file is used to test github actions locally using act (https://github.com/nektos/act?tab=readme-ov-file)

# Github repository scoped variables.
ACT="true" # Used to let actions know they're being run locally.
BUILD_CONFIGURATIONS="[\"Release\"]"
BASE_OS="ubuntu-latest"
BUILD_OS="[\"ubuntu-latest\"]"
BUILD_PROJECT="./src/Tableau.Migration/Tableau.Migration.csproj"
NUGET_PACKAGE_FOLDER="Tableau.Migration"
PUBLISH_OS="ubuntu-latest"
DOCS_OS="ubuntu-latest"
PYTHON_NETPACKAGE_FRAMEWORK="net8.0"
PYTHON_PUBLISH_DOCS_VERSION="3.11"
PUBLISH_CONFIGURATION="Release"
PUBLISH_PACKAGE_OS="ubuntu-latest"

# These are github environment scoped variables.
# Development
NUGET_PACKAGE_REPOSITORY="https://artifactory.dev.tableautools.com/artifactory/api/nuget/pqt-tuk/Tableau.Migration"
PYPI_PUBLISH_USER="svc_cmt"
NUGET_PUBLISH_USER="svc_cmt"
PYPI_PACKAGE_REPOSITORY="https://artifactory.dev.tableautools.com/artifactory/api/pypi/tab-pypi-local-tuk/"

# Staging
#NUGET_PACKAGE_REPOSITORY="https://artifactory.prod.tableautools.com/artifactory/api/nuget/power-tools-nuget-local/Tableau.Migration"
#PYPI_PUBLISH_USER="svc_cmt"
NUGET_PUBLISH_USER="svc_cmt"
#PYPI_PACKAGE_REPOSITORY="https://artifactory.prod.tableautools.com/artifactory/api/pypi/tabpypi"

# Public Test
# NUGET_PACKAGE_REPOSITORY="https://apiint.nugettest.org/v3/index.json"
# PYPI_PACKAGE_REPOSITORY="https://test.pypi.org/legacy/"
# PYPI_PUBLISH_USER="__token__"

# Public Prod
# NUGET_PACKAGE_REPOSITORY="https://api.nuget.org/v3/index.json"
# PYPI_PACKAGE_REPOSITORY="https://upload.pypi.org/legacy/"
# PYPI_PUBLISH_USER="__token__"
6 changes: 3 additions & 3 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Build Docs (.NET ${{ inputs.dotnet-sdk-version }}) # Updated name
steps:
# Checkout the repository
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Setup .NET environment
- name: Setup .NET ${{ inputs.dotnet-sdk-version }}
Expand All @@ -29,7 +29,7 @@ jobs:

# Setup Python environment
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version }}

Expand All @@ -41,7 +41,7 @@ jobs:

# Upload Docs Artifact
- name: Upload Docs Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: docs
path: ./docs
13 changes: 6 additions & 7 deletions .github/workflows/build-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
## SETUP

# Checkout the repository
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Setup .NET environment
- name: Setup .NET ${{ inputs.dotnet-sdk-version }}
Expand All @@ -45,7 +45,7 @@ jobs:

# Cache NuGet packages based on the lock file and .NET version
- name: Cache NuGet packages
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ inputs.dotnet-sdk-version }}-${{ hashFiles('**/packages.lock.json') }}
Expand Down Expand Up @@ -109,17 +109,16 @@ jobs:
# Upload product artifacts
- name: Upload product artifacts for python library
if: ${{ env.SHOULD_PUBLISH == 'true' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: product-${{ matrix.config }}-net${{ inputs.dotnet-sdk-version }}
path: "./src/Python/src/tableau_migration/bin/**"
retention-days: 15 # This is not required to stick around very long as it's not pushed to production.

# Upload test artifacts
# TODO: [W-18497981: CI/CD Improvements: Python tests should test final package | Work](https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00002EIUwKYAX/view)
- name: Upload Tests Artifacts
if: ${{ env.SHOULD_PUBLISH == 'true' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: tests-${{ matrix.config }}-net${{ inputs.dotnet-sdk-version }}
path: "./dist/tests/**"
Expand All @@ -128,7 +127,7 @@ jobs:
# Upload NuGet package artifact
- name: Upload NuGet Artifact
if: ${{ env.SHOULD_PUBLISH == 'true' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: nuget-package-${{ matrix.config }}-net${{ inputs.dotnet-sdk-version }}
path: "./src/${{ vars.NUGET_PACKAGE_FOLDER }}/bin/${{ matrix.config }}/*.nupkg"
Expand All @@ -137,7 +136,7 @@ jobs:
# Upload build output for tests
- name: Upload Build Output
if: ${{ env.SHOULD_PUBLISH == 'true' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: build-output-${{ matrix.config }}-net${{ inputs.dotnet-sdk-version }}
path: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
name: Build Python Package with ${{ inputs.build-config }} configuration
steps:
# Checkout the repository
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Setup Python environment
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ vars.PYTHON_TEST_VERSIONS }}
cache: "pip" # caching pip dependencies
Expand All @@ -44,11 +44,11 @@ jobs:
shell: pwsh
run: |
python -m pip install --upgrade pip
python -m pip install hatch
python -m pip install hatch click==8.2

# Cache Hatch environments
- name: Cache Hatch environments
uses: actions/cache@v4
uses: actions/cache@v5
with:
# Default Hatch env location relative to working-directory.
path: ./.hatch
Expand All @@ -58,7 +58,7 @@ jobs:
${{ runner.os }}-py${{ vars.PYTHON_TEST_VERSIONS }}-hatch-

# Download the product artifact
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: product-${{ inputs.build-config }}-net${{ inputs.dotnet-build-version }}
path: ./src/Python/src/tableau_migration/bin/
Expand All @@ -82,15 +82,15 @@ jobs:

# Upload PyPI artifact
- name: Upload Pypi Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: pypi-package-bundle
path: ${{ env.WORKING_DIRECTORY }}/tableau_migration-pypi.zip
if-no-files-found: error

# Upload PyPI artifact
- name: Upload Pypi Artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: pypi-package
path: ${{ env.WORKING_DIRECTORY }}/dist/*
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ on:
description: "The github environment that has the variables and secrets"
required: true
type: string
dotnet-build-version:
description: "The .NET version used for building"
required: true
type: string

jobs:
create-release:
Expand All @@ -34,7 +38,7 @@ jobs:
# Create Release
- name: Create Release
id: create-release
uses: actions/github-script@v7
uses: actions/github-script@v8
env:
RELEASE_VERSION: ${{ inputs.release-version }}
with:
Expand Down Expand Up @@ -67,31 +71,31 @@ jobs:

# Download Docs
- name: Download Docs
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: docs

# Download NuGet Package
- name: Download NuGet Package
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: nuget-package
name: nuget-package-Release-net${{ inputs.dotnet-build-version }}

# Download PyPI Package
- name: Download PyPI Package
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: pypi-package-bundle

# Generate Bundle
- name: Generate Bundle
run: |
zip -r bundle.zip ./Tableau.Migration.${{ inputs.release-version }}.nupkg docs.zip tableau_migration-pypi.zip
zip -r bundle.zip Tableau.Migration.${{ inputs.release-version }}.nupkg docs.zip tableau_migration-pypi.zip

# Attach Release Artifacts
- name: Attach Artifacts to Github Release
id: upload-docs
uses: actions/github-script@v7
uses: actions/github-script@v8
env:
RELEASE_VERSION: ${{ inputs.release-version }}
RELEASE_ID: ${{ steps.create-release.outputs.result }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
runs-on-config: ${{ vars.PUBLISH_OS }}
release-version: ${{ inputs.release-version }}
publish-environment: ${{ inputs.publish-environment }}
dotnet-build-version: ${{ inputs.dotnet-build-version }}

deploy-docs:
name: Deploy Docs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
# Download Docs
- name: Download Docs
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: docs
path: ./docs
Expand All @@ -43,7 +43,7 @@ jobs:

# Upload to GitHub Pages
- name: Upload Github Pages
uses: actions/upload-pages-artifact@v3.0.1
uses: actions/upload-pages-artifact@v4.0.0
with:
path: "./docs"

Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/deploy-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
}

# Checkout the repository
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Setup .NET environment
- name: Setup .NET
Expand All @@ -65,7 +65,7 @@ jobs:
uses: ./.github/actions/setup-dotnet

# Download the NuGet package artifact
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: nuget-package-Release-net${{ inputs.dotnet-build-version }}

Expand All @@ -80,21 +80,15 @@ jobs:
if ("${{ vars.NUGET_PUBLISH_USER }}" -ne "") {
Write-Host "Using username and API key authentication for environment: $publishEnv"

# Use unique source name based on GitHub run ID
$uniqueSourceName = "$publishEnv-${{ github.run_id }}"

# Add the NuGet source configuration
# Add the NuGet source configuration (ignore if already exists)
dotnet nuget add source ${{ env.NUGET_PACKAGE_REPOSITORY }} `
--name $uniqueSourceName `
--name $publishEnv `
--username ${{ vars.NUGET_PUBLISH_USER }} `
--password ${{ secrets.NUGET_PUBLISH_API_KEY }} `
--store-password-in-clear-text

# Push the package
dotnet nuget push Tableau.Migration.*.nupkg -s $uniqueSourceName
--store-password-in-clear-text 2>$null

# Clean up temporary source
dotnet nuget remove source $uniqueSourceName
# Push the package using the configured source
dotnet nuget push Tableau.Migration.*.nupkg -s $publishEnv
}
else {
Write-Host "Using API key only authentication for environment: $publishEnv"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/deploy-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ jobs:
}

# Checkout the repository
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# Setup Python environment
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
# Only setup python if the runs-on-config is not self-hosted.
# Self-hosted runners already have python installed.
# This workflow needs to run in github on self-hosted runners to have access to artifactory.
Expand All @@ -70,22 +70,22 @@ jobs:
cache: "pip" # caching pip dependencies

# Install dependencies
# TODO: [W-18497996: CI/CD Improvements: deploy-python should run via ...pdated more easily | Work](https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00002EIZBPYA5/view)
- name: Install dependencies
shell: pwsh
run: |
python -m pip install --upgrade pip
python -m pip install hatch twine>=6.1.0
python -m pip install --upgrade pip hatch

# Download python package artifact
- name: Download Python Package Artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: pypi-package
path: ./dist

# Publish Python package
- name: Deploy Python Package
shell: pwsh
working-directory: ./src/Python
env:
# Twine uses env variables to set the username, password, and repository url.
TWINE_USERNAME: ${{ env.PYPI_PUBLISH_USER }}
Expand All @@ -94,4 +94,4 @@ jobs:
TWINE_REPOSITORY_URL: ${{ env.PYPI_PACKAGE_REPOSITORY }}

run: |
python -m twine upload dist/*
hatch run deploy:twine upload ../../dist/*
Loading