Skip to content

Commit

Permalink
Merge pull request #5 from DavidJGapCR/update-fork
Browse files Browse the repository at this point in the history
Update fork.
  • Loading branch information
DavidJGapCR authored Feb 15, 2022
2 parents e8e5cac + 2bbf46b commit a069d0c
Show file tree
Hide file tree
Showing 320 changed files with 122,534 additions and 1,275 deletions.
87 changes: 0 additions & 87 deletions .github/workflows/PG_test1.yml

This file was deleted.

30 changes: 16 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,23 @@ on:
workflow_dispatch:

env:
BUILD_VERSION: "2.6.1"
BUILD_VERSION: ${{ secrets.SEMANTIC_VERSION }}
CONFIGURATION: "Release"
GA_USE_GITHUB_ENV: "true"
USE_MSSQL_DEFAULT_CONN_STRING: "FALSE"
USE_POSTGRES_DEFAULT_CONN_STRING: "FALSE"
SQLSERVER_SERVER: "localhost"
SQLSERVER_SA_PASS: ${{ secrets.MSSQL_SA_PWD }}
SQLSERVER_ADMIN_USER: "sa"
SQLSERVER_ADMIN_PASS: ${{ secrets.MSSQL_SA_PWD }}
SQLSERVER_DATABASE_DS2: "AnalyticsMiddleTier_Testing_Ds2"
SQLSERVER_DATABASE_DS31: "AnalyticsMiddleTier_Testing_Ds31"
SQLSERVER_DATABASE_DS32: "AnalyticsMiddleTier_Testing_Ds32"
SQLSERVER_DATABASE_DS33: "AnalyticsMiddleTier_Testing_Ds33"
SQLSERVER_INTEGRATED_SECURITY: "false"
SQLSERVER_USER: ${{ secrets.MSSQL_USER }}
SQLSERVER_PASS: ${{ secrets.MSSQL_PWD }}
POSTGRES_HOST: "localhost"
POSTGRES_DATABASE: "edfi_ods_tests_ds32"
POSTGRES_DATABASE_DS32: "edfi_ods_tests_ds32"
POSTGRES_DATABASE_DS33: "edfi_ods_tests_ds33"
POSTGRES_PORT: "5432"
POSTGRES_USER: ${{ secrets.POSTGRESQL_USER }}
Expand Down Expand Up @@ -59,12 +61,13 @@ jobs:
steps:
- name: Start Ubuntu container for SQLServer 2017 Express
run: |
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=${{ env.SQLSERVER_SA_PASS }}" -e "MSSQL_PID=Express" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=${{ env.SQLSERVER_ADMIN_PASS }}" -e "MSSQL_PID=Express" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579

- name: Caching packages
uses: actions/cache@v2
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
Expand All @@ -78,18 +81,17 @@ jobs:

- name: Create Postgres DB DS v3.2
run: |
.\eng\CreateTestDbAndSchema.ps1 -port ${{ env.POSTGRES_PORT }} -d ${{ env.POSTGRES_DATABASE }}
.\eng\CreateTestDbAndSchema.ps1 -port ${{ env.POSTGRES_PORT }} -d ${{ env.POSTGRES_DATABASE_DS32 }} -ds 3.2
shell: pwsh
env:
PGPASSWORD: ${{ env.POSTGRES_PASS }}

# TODO: Pass as parameter the path of the postgres version 3.3 script.
#- name: Create Postgres DB DS v3.3
# run: |
# .\eng\CreateTestDbAndSchema.ps1 -port ${{ env.POSTGRES_PORT }} -d ${{ env.POSTGRES_DATABASE_DS33 }}
# shell: pwsh
# env:
# PGPASSWORD: {{ env.POSTGRESQL_PWD }}
- name: Create Postgres DB DS v3.3
run: |
.\eng\CreateTestDbAndSchema.ps1 -port ${{ env.POSTGRES_PORT }} -d ${{ env.POSTGRES_DATABASE_DS33 }} -ds 3.3
shell: pwsh
env:
PGPASSWORD: ${{ env.POSTGRES_PASS }}

- name: Unit Tests
run: |
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/create-pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.

name: Create Release/Pre-Release

on:
workflow_dispatch:
inputs:
releaseName:
description: 'Release Name'
required: true
default: '<AMT>'
releaseDescription:
description: 'Release Description'
required: true
default: '<Description>'
createRelease:
description: 'Create Release'
required: true
default: 'false'

env:
BUILD_VERSION: ${{ secrets.SEMANTIC_VERSION }}
CONFIGURATION: "Release"
PUBLISH_FOLDER: "./publish/"
PUBLISH_FDD_ZIP: "EdFi.AnalyticsMiddleTier-${{ secrets.SEMANTIC_VERSION }}.zip"
PUBLISH_SCD_ZIP: "EdFi.AnalyticsMiddleTier-win10.x64-${{ secrets.SEMANTIC_VERSION }}.zip"

jobs:
AMT-Create-Release:
runs-on: Ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579

- name: Caching packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Publish self-contained deployment
run: |
.\build.ps1 publish -SelfContained ${{ env.CONFIGURATION }} -Version ${{ env.BUILD_VERSION }} -BuildCounter ${{ github.run_number }}
shell: pwsh

- name: Publish framework-dependent deployment
run: |
.\build.ps1 publish -Configuration ${{ env.CONFIGURATION }} -Version ${{ env.BUILD_VERSION }} -BuildCounter ${{ github.run_number }}
shell: pwsh

- name: Create Zip file
run: |
.\build.ps1 CreateZip -Configuration ${{ env.CONFIGURATION }} -Version ${{ env.BUILD_VERSION }} -BuildCounter ${{ github.run_number }}
shell: pwsh

- name: Create pre-release
id: create_pre_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
RELEASE_TAG: ${{ contains( github.event.inputs.createRelease, 'true') && env.BUILD_VERSION || format('{0}-pre-{1}', env.BUILD_VERSION, github.run_id) }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: ${{ env.BUILD_VERSION }} ${{ github.event.inputs.releaseName }}
body: |
${{ github.event.inputs.releaseDescription }}
draft: false
prerelease: ${{ !contains( github.event.inputs.createRelease, 'true') }}

- name: Upload publish zip
id: upload-publish-zip-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_pre_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PUBLISH_FOLDER }}${{ env.PUBLISH_FDD_ZIP }}
asset_name: ${{ env.PUBLISH_FDD_ZIP }}
asset_content_type: application/zip

- name: Upload self-contained publish zip
id: upload-publish-self-contained-zip-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_pre_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PUBLISH_FOLDER }}${{ env.PUBLISH_SCD_ZIP }}
asset_name: ${{ env.PUBLISH_SCD_ZIP }}
asset_content_type: application/zip
23 changes: 5 additions & 18 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ param(

# Assembly and package version number, defaults 2.6.1
[string]
$Version = "2.6.1",
$Version = "2.7.1",

# Build counter from the automation tool.
[string]
Expand All @@ -74,8 +74,8 @@ $publishFddDirectoryName = "EdFi.AnalyticsMiddleTier"
$publishScdDirectoryName = "EdFi.AnalyticsMiddleTier-win10.x64"
$publishFddOutputDirectory = "$publishOutputPath/$publishFddDirectoryName"
$publishScdOutputDirectory = "$publishOutputPath/$publishScdDirectoryName"
$publishFddZipFile = "$publishFddDirectoryName.zip"
$publishScdZipFile = "$publishScdDirectoryName.zip"
$publishFddZipFile = "$publishFddDirectoryName-$Version.zip"
$publishScdZipFile = "$publishScdDirectoryName-$Version.zip"
$testProjectName = "EdFi.AnalyticsMiddleTier.Tests"

function Clean {
Expand Down Expand Up @@ -125,19 +125,6 @@ function Compile {
Invoke-Execute {
dotnet --info
dotnet build $solutionRoot -c $Configuration --nologo

# Copy .env file if it exists
if (Test-Path -Path $solutionRoot/$testProjectName/.env -PathType leaf) {
$doc = New-Object System.Xml.XmlDocument
$projectFile = Get-Item $solutionRoot/$testProjectName/$testProjectName'.csproj'
$doc.Load($projectFile)
$TargetFrameworkNode = $doc.SelectSingleNode("Project//PropertyGroup//TargetFramework")

if ($TargetFrameworkNode) {
$TargetFramework = $TargetFrameworkNode.InnerText
Copy-Item $solutionRoot/$testProjectName/.env -Destination $solutionRoot/$testProjectName/bin/$Configuration/$TargetFramework/ -Force
}
}
}
}

Expand Down Expand Up @@ -166,13 +153,13 @@ function CreateZip {
if (Test-Path $fddPackDestination) {
Remove-Item $fddPackDestination
}
Compress-Archive -Path $publishFddOutputDirectory -DestinationPath $fddPackDestination
Compress-Archive -Path $publishFddOutputDirectory/* -DestinationPath $fddPackDestination
}
if(Test-Path $publishScdOutputDirectory){
if (Test-Path $scdPackDestination) {
Remove-Item $scdPackDestination
}
Compress-Archive -Path $publishScdOutputDirectory -DestinationPath $scdPackDestination
Compress-Archive -Path $publishScdOutputDirectory/* -DestinationPath $scdPackDestination
}
}
}
Expand Down
29 changes: 0 additions & 29 deletions client.js

This file was deleted.

7 changes: 7 additions & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
* Licensed to the Ed-Fi Alliance under one or more agreements.
* The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
* See the LICENSE and NOTICES files in the project root for more information.
*/

5 changes: 5 additions & 0 deletions docker/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MSSQL_PID = Express
SQLSERVER_ADMIN_PASS = Your_Str0ng_P4ssword
POSTGRES_USER = postgres
POSTGRES_PASSWORD = Your_Str0ng_P4ssword
POSTGRES_DB = postgres
Loading

0 comments on commit a069d0c

Please sign in to comment.