Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused dependency #322

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ jobs:
with:
go-version: "^1.19.5"

- name: Embed octo portable
run: |
pwsh ./embed-octo.ps1

- name: Replace versions in tasks and create vsix
run: |
./pack.ps1 -environment Production -version ${{ needs.build.outputs.package_version }} -setupTaskDependencies
Expand Down
27 changes: 16 additions & 11 deletions .octopus/deployment_process.ocl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
step "Push to Azure Marketplace" {
step "push-to-azure-marketplace" {
name = "Push to Azure Marketplace"

action {
action_type = "Octopus.Script"
Expand All @@ -19,15 +20,18 @@ step "Push to Azure Marketplace" {
# Install PowerShell
apt-get install -y powershell


environment=$(get_octopusvariable "Octopus.Environment.Name")
version=$(get_octopusvariable "Octopus.Release.Number")
version=$(get_octopusvariable "Octopus.Action.Package[OctoTFS.vsix].PackageVersion")
accessToken=$(get_octopusvariable "AccessToken")
shareWith=$(get_octopusvariable "ShareWith")
vsixPath=$(get_octopusvariable "Octopus.Action.Package[OctoTFS.vsix].ExtractedPath")
publishPath=$(get_octopusvariable "Octopus.Action.Package[OctoTFS.publish].ExtractedPath")

npm install -g tfx-cli

export TFX_TRACE=1

pwsh $publishPath/publish.ps1 -environment $environment -version $version -accessToken $accessToken -packagePath $vsixPath -manifestsPath $publishPath -shareWith "$shareWith" || exit 1

if [ "$environment" == "Test" ]
Expand All @@ -45,20 +49,20 @@ step "Push to Azure Marketplace" {

new_octopusartifact "/home/Octopus/$artifactFile" "$artifactFile"

EOT
EOT
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "Bash"
}
worker_pool = "Hosted Ubuntu"
worker_pool = "hosted-ubuntu"

container {
feed = "Docker Hub"
feed = "docker-hub"
image = "node:buster"
}

packages "OctoTFS.vsix" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "OctoTFS.vsix"
properties = {
Extract = "True"
Expand All @@ -69,7 +73,7 @@ step "Push to Azure Marketplace" {

packages "OctoTFS.publish" {
acquisition_location = "Server"
feed = "Octopus Server (built-in)"
feed = "octopus-server-built-in"
package_id = "OctoTFS.publish"
properties = {
Extract = "True"
Expand All @@ -80,11 +84,12 @@ step "Push to Azure Marketplace" {
}
}

step "Queue and verify a test build" {
step "queue-and-verify-a-test-build" {
name = "Queue and verify a test build"

action {
action_type = "Octopus.Script"
environments = ["Test"]
environments = ["test"]
properties = {
Octopus.Action.Script.ScriptBody = <<-EOT
$queueBuildUrl = "https://octopus-deploy-test.visualstudio.com/DefaultCollection/VSTS.Extensions.TestProject/_apis/build/builds?api-version=2.0"
Expand Down Expand Up @@ -147,10 +152,10 @@ step "Queue and verify a test build" {
Write-Error "Build failed or didn't finish within 5 minutes!"
}

EOT
EOT
Octopus.Action.Script.ScriptSource = "Inline"
Octopus.Action.Script.Syntax = "PowerShell"
}
worker_pool = "Hosted Ubuntu"
worker_pool = "hosted-ubuntu"
}
}
3 changes: 1 addition & 2 deletions .octopus/deployment_settings.ocl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ connectivity_policy {
}

versioning_strategy {

donor_package {
package = "OctoTFS.vsix"
step = "Push to Azure Marketplace"
step = "push-to-azure-marketplace"
}
}
2 changes: 1 addition & 1 deletion .octopus/schema_version.ocl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 3
version = 6
4 changes: 0 additions & 4 deletions embed-octo.cmd

This file was deleted.

88 changes: 0 additions & 88 deletions embed-octo.ps1

This file was deleted.

18 changes: 18 additions & 0 deletions pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,23 @@ function UpdateTaskManifests($workingDirectory, $version, $envName) {
}
}


function IsUnsupportedNode($directory) {
$result = $directory | Select-String -Pattern 'node-(\d+)'
foreach ($r in $result) {
if ([int] $r.Matches.Groups[1].Value -gt 9) {
return $false
}
}
return $true
}

function PruneDeasync($moduleDirectory) {
Get-ChildItem $moduleDirectory\deasync\bin -Filter "*-ia32-*" -Directory | Remove-Item -Recurse

Get-ChildItem $moduleDirectory\deasync\bin -Directory | Where-Object {IsUnsupportedNode $_.FullName} | Remove-Item -Recurse
}

function SetupTaskDependencies($workingDirectory) {
$tempPath = "$basePath/modules";

Expand All @@ -66,6 +83,7 @@ function SetupTaskDependencies($workingDirectory) {
$command = "$goPath/bin/node-prune"

Invoke-Expression "$command $tempPath/node_modules"
PruneDeasync "$tempPath/node_modules"

$taskManifestFiles = Get-ChildItem $workingDirectory -Include "task.json" -Recurse

Expand Down
Loading
Loading