Skip to content

Commit

Permalink
Merge pull request #64 from NoxOrg/feature/workflow_scripts
Browse files Browse the repository at this point in the history
Added scripts back
  • Loading branch information
jan-schutte committed Jul 5, 2023
2 parents 440714a + 9ed33dd commit 2453a7a
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/Nox.Cli.Caching/NoxCliCacheManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ public void RefreshTemplate(string name)
public NoxCliCacheManager(string remoteUrl, IPersistedTokenCache? tokenCache = null)
{
_buildLog = new List<string>();
if (string.IsNullOrEmpty(remoteUrl))
{
_remoteUrl = remoteUrl;
}
else
{
_remoteUrl = "https://noxorg.dev";
}
_remoteUrl = remoteUrl;
_cachePath = WellKnownPaths.CachePath;
_workflowCachePath = WellKnownPaths.WorkflowsCachePath;
Expand Down
6 changes: 3 additions & 3 deletions src/Nox.Cli/Nox.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Copyright (c) Andre Sharpe 2022</Copyright>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>1.0.17.0</AssemblyVersion>
<FileVersion>1.0.17.0</FileVersion>
<PackageVersion>1.0.17</PackageVersion>
<AssemblyVersion>1.0.18.0</AssemblyVersion>
<FileVersion>1.0.18.0</FileVersion>
<PackageVersion>1.0.18</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/NoxOrg/Nox.Cli</PackageProjectUrl>
<RepositoryUrl>https://github.com/NoxOrg/Nox.Cli.git</RepositoryUrl>
Expand Down
10 changes: 10 additions & 0 deletions tests/Nox.Cli.Server.Tests/files/NoxCliCache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"UserPrincipalName":"",
"TenantId":"88155c28-f750-4013-91d3-8347ddb3daa7",
"RemoteUrl":"http://localhost:9000",
"TemplateUrl":"http://localhost:9000/templates/",
"WorkflowUrl":"http://localhost:9000/workflows/",
"Expires":"2023-05-17T13:48:25.6161389+02:00",
"WorkflowInfo":[],
"TemplateInfo":[]
}
38 changes: 38 additions & 0 deletions tests/workflows/Test.find-cname-record.workflow.nox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# NOX Test Find CName record

name: Test Find CName record
cli:
branch: test
command: find-cname-record
command-alias: fcnrec
description: Test Find CName record
examples:
- ["sync find-cname-record", "--path <designFolder>"]
- ["sync fcnrec", "--path <designFolder>"]

jobs:
sync-test:
steps:
- name: Connect to AAD
id: connect
uses: azuread/connect_v1
with:
tenant-id: ${{ server.secrets.AZURE_TENANT_ID }}
client-id: ${{ server.secrets.AZURE_CLIENT_ID }}
client-secret: ${{ server.secrets.AZURE_CLIENT_SECRET }}
display:
success: Connected to Azure AD
error: Failed to connect to Azure AD ${{ steps.connect.error-message }}
run-at-server: true

- name: Find CName
id: find-cname
uses: azuread/find-cname-record@v1
with:
aad-client: ${{ steps.connect.outputs.aad-client }}
resource-group-name: rg_dns_common_prod
zone-name: ingena.work
display:
success: Searched for CName record
error: Unable to search for CName record (${{ steps.find-cname.error-message }})
run-at-server: true

0 comments on commit 2453a7a

Please sign in to comment.