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

Tweak ssh-deployments to reference all external feeds, not just nuget #2602

Merged
merged 3 commits into from
Jan 6, 2025
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dictionary-octopus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ emptytitle
entra
environmentids
eprintfn
esac
expressjs
externalgroups
externalusers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ If you are writing a cross-platform script, be aware of the differences between
:::div{.hint}
**Bash (and other shell) variables**
Octopus Deploy will log into the SSH target via a non-interactive shell. Because of this, startup files like `.bashrc` are not fully evaluated. If you are referencing bash variables `export`ed in these files, you should move them before the following common code block at the top of the file:
```

```bash
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
```

This will ensure that they are evaluated on non-interactive logins.
:::


### Example: Using variables in Bash

Your script can use a [variable value](/docs/projects/variables) by invoking the `get_octopusvariable` function. For example, to echo out the installation directory call
Expand All @@ -48,17 +49,17 @@ Your script can use a [variable value](/docs/projects/variables) by invoking the

You can also set an [output variable](/docs/projects/variables/output-variables):

> ```
> set_octopusvariable RandomNumber 3
> ```
```bash
set_octopusvariable RandomNumber 3
```

### Example: Collecting an artifact

Your script can tell Octopus to collect a file and store it as a [deployment artifact](/docs/projects/deployment-process/artifacts):

> ```
> new_octopusartifact "./subdir/anotherdir/myfile"
> ```
```bash
new_octopusartifact "./subdir/another_dir/my_file"
```

which results in the server retrieving that file, at the end of that step. Keep in mind that this means the file must be accessible over SFTP using the same credentials as that used during execution.

Expand All @@ -76,11 +77,11 @@ By making all paths relative to the user's home directory, you can then theoreti

## Package acquisition

Leveraging Calamari means that the deployment can obtain the package via the same methods as a target running the Tentacle agent; either pushed from the server or directly from a NuGet repository. There is therefore no bottleneck in acquisition if there are multiple SSH endpoints all trying to retrieve the same package independently.
Leveraging Calamari means that the deployment can obtain the package via the same methods as a target running the Tentacle agent; either pushed from the server or directly from a supported [external repository](/docs/packaging-applications/package-repositories). There is therefore no bottleneck in acquisition if there are multiple SSH endpoints all trying to retrieve the same package independently.

## Calamari

Calamari is the tool Octopus uses to execute deployments on a remote computer. Before any processing is begun we do an initial check to ensure the available Calamari executable on the endpoint is up to date with the server. If not, we push up the latest Calamari package and then recommence the task. The Calamari package is sent as a `.tar.gz` so it can be extracted with minimal dependencies. This means the server needs to be able to un-tar that package, however, this should be available by default in most distros.
Calamari is the tool Octopus uses to execute deployments on a remote computer. Before any processing is begun we do an initial check to ensure the available Calamari executable on the endpoint is up to date with the server. If not, we push up the latest Calamari package and then recommence the task. The Calamari package is sent as a `.tar.gz` so it can be extracted with minimal dependencies. This means the server needs to be able to un-tar that package, however, this should be available by default in most distributions.

## Learn more

Expand Down
Loading