You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/publishing.md
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
---
2
2
title: "Publishing"
3
-
description: How to use Flox environments to build artifacts
3
+
description: Understanding how to publish packages with Flox
4
4
---
5
5
6
-
Once you've built an artifact with the [`flox build`][flox-build] command, you likely want to _use_ it somewhere.
7
-
The [`flox publish`][flox-publish] command gives you the ability to upload artifacts to your private catalog so that you can _install_ them into your environments.
6
+
Once you've built a package with the [`flox build`][flox-build] command, you likely want to _use_ it somewhere.
7
+
The [`flox publish`][flox-publish] command gives you the ability to upload packages to your private catalog so that you can _install_ them into your environments.
8
8
In order to share packages with other people you must create an organization.
9
9
See the [organizations][organizations-concept] page for more details.
10
10
11
-
## Uploading an artifact
11
+
## Uploading a package
12
12
13
-
The `flox publish <name>` command allows you to upload an artifact built with the `flox build` command, where `<name>` is the name of any build listed in the `build` section of the manifest.
13
+
The `flox publish <name>` command allows you to upload a package built with the `flox build` command, where `<name>` is the name of any build listed in the `build` section of the manifest.
14
14
15
15
```toml
16
16
# manifest.toml
@@ -26,44 +26,44 @@ $ flox publish mypkg
26
26
27
27
## Publish process
28
28
29
-
In order to make sure that the uploaded artifact can be built reproducibly,
29
+
In order to make sure that the uploaded package can be built reproducibly,
30
30
Flox imposes some constraints on the build and publish process.
31
31
32
32
- The Flox environment performing the build must tracked in a git repository.
33
33
- Tracked files in the git repository must be clean.
34
34
- The git repository has a remote defined, and the current revision has been pushed to it.
35
35
- The Flox environment must have at least one package installed to it.
36
36
37
-
All of this is there to ensure that the published artifact can be locked to a point in time in the Base Catalog and an upstream source revision.
37
+
All of this is there to ensure that the published package can be locked to a point in time in the Base Catalog and an upstream source revision.
38
38
As a reminder, the Base Catalog is the built-in [Catalog][catalog-concept] provided by Flox.
39
39
40
40
As part of the `flox publish` command, the CLI will clone the git repository to a temporary directory to ensure that any files referenced in the build are tracked by the repository.
41
41
A clean `flox build` is then run in this directory.
42
42
43
-
If the build completes successfully, the artifact, its closure (all the software it depends on), and its metadata are uploaded to your Catalog.
43
+
If the build completes successfully, the package, its closure (all the software it depends on), and its metadata are uploaded to your Catalog.
44
44
45
45
## The published payload
46
46
47
-
A published artifact consists of two parts:
47
+
A published package consists of two parts:
48
48
49
-
- The artifact metadata
50
-
- The artifact itself
49
+
- The package metadata
50
+
- The package itself
51
51
52
-
The artifact metadata is uploaded to Flox servers so that the Flox CLI can see that it's available via the [`flox search`][flox-search], [`flox show`][flox-show], and [`flox install`][flox-install] commands.
53
-
The artifact itself is uploaded to a Catalog Store.
52
+
The package metadata is uploaded to Flox servers so that the Flox CLI can see that it's available via the [`flox search`][flox-search], [`flox show`][flox-show], and [`flox install`][flox-install] commands.
53
+
The package itself is uploaded to a Catalog Store.
54
54
55
-
A Catalog Store is effectively a cache for published artifacts, and Flox provides one by default.
55
+
A Catalog Store is effectively a cache for published packages, and Flox provides one by default.
56
56
An organization can choose to provide their own Catalog Store in the form of an S3-compatible storage provider.
57
-
In this case, it means that your organization has complete control over your artifacts and they will never be stored by Flox.
57
+
In this case, it means that your organization has complete control over your packages and they will never be stored by Flox.
58
58
To pursue this option, contact Flox directly.
59
59
60
-
## Consuming published artifacts
60
+
## Consuming published packages
61
61
62
-
Once you have uploaded an artifact via `flox publish`, the package becomes available in `flox search`, `flox show`, and `flox install`.
62
+
Once you have uploaded a package via `flox publish`, the package becomes available in `flox search`, `flox show`, and `flox install`.
63
63
To distinguish these packages from those provided by the Base Catalog, published packages are prefixed with the name of the user or organization.
64
-
For example, if your user is called `myuser` and you publish an artifact named `hello`, the artifact will appear as `myuser/hello` in the Flox CLI.
64
+
For example, if your user is called `myuser` and you publish a package named `hello`, the package will appear as `myuser/hello` in the Flox CLI.
65
65
66
-
When a user runs `flox install myuser/hello`, the artifact is downloaded directly from the Catalog Store that it was published to.
66
+
When a user runs `flox install myuser/hello`, the package is downloaded directly from the Catalog Store that it was published to.
67
67
If organizations configure their own Catalog Store (rather than using the default Catalog Store provided by Flox), it is never downloaded to or cached on Flox servers.
Copy file name to clipboardExpand all lines: docs/tutorials/build-and-publish.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Build and publish packages
3
-
description: Building and publishing software artifacts with Flox
3
+
description: Building and publishing custom packages with Flox
4
4
---
5
5
6
6
# Building with Flox
@@ -86,16 +86,16 @@ Everything appears to be in working order, so now we can discuss what it looks l
86
86
## Define a build
87
87
88
88
In order to define a Flox build, we add an entry to the `[build]` section of the manifest.
89
-
Every name added to the `build` section creates a new artifact.
90
-
In our case the artifact will be the compiled Go program, but you can use Flox to build all kinds of things.
89
+
Every name added to the `build` section creates a new package.
90
+
In our case the package will be the compiled Go program, but you can use Flox to build all kinds of things.
91
91
See the [builds][build-concept] page for more examples of what you can build with Flox.
92
92
93
93
All that's necessary to define a build is a short script that does two things:
94
94
95
95
- Runs any commands necessary to build the program
96
96
- Copies the program to a directory called `$out`
97
97
98
-
The `$out` shell variable holds the path to a temporary directory where your build artifact should be placed (again, "artifact" in our case means the compiled `hello` program).
98
+
The `$out` shell variable holds the path to a temporary directory where your build package should be placed (again, "package" in our case means the compiled `hello` program).
99
99
The `$out` directory adheres to the [Filesystem Hierarchy Standard (FHS)][fhs], which is just the formal name for the convention of placing executable files in `/bin`, libraries in `/lib`, etc.
100
100
For this `hello` program we'll want to place it in `$out/bin` since `hello` is an executable program, and that's where the FHS says to put those types of files.
101
101
Flox expects you to put executables there, and if you put them somewhere else you may experience unexpected behavior.
@@ -186,18 +186,18 @@ Completed build of hello-opt-unknown in local mode
Now that the artifact is built, we can send it somewhere.
194
-
Every user has a private catalog that they can publish artifacts to.
193
+
Now that the package is built, we can send it somewhere.
194
+
Every user has a private catalog that they can publish packages to.
195
195
In order to share packages with other people you must create an organization.
196
196
This is a paid feature, and if you would like access to it you should contact Flox directly.
197
197
See the [organizations][organizations-concept] page for more details.
198
198
199
-
Now that you've built the artifact you can [publish][publish-concept] it to your private catalog via the `flox publish` command.
200
-
This command has a few requirements to make sure that the artifact you're publishing can be built by other people reproducibly:
199
+
Now that you've built the package you can [publish][publish-concept] it to your private catalog via the `flox publish` command.
200
+
This command has a few requirements to make sure that the package you're publishing can be built by other people reproducibly:
201
201
202
202
- The Flox environment must be in a git repository.
203
203
- All tracked files in the repository must be clean.
@@ -211,16 +211,16 @@ Let's say that we've done all of that so that we can publish our `hello` program
211
211
flox [myproject] $ flox publish hello
212
212
```
213
213
214
-
The `flox publish` command performs a clean build of the artifact in a temporary directory to ensure that the build doesn't depend on anything outside of the git repository.
214
+
The `flox publish` command performs a clean build of the package in a temporary directory to ensure that the build doesn't depend on anything outside of the git repository.
215
215
216
-
In order to upload an artifact during the publish process (and not just upload metadata), you must provide a signing key via the `--signing-private-key` option.
217
-
Attempting to upload an artifact without a signing key is an error because other users would not be able to install the artifact.
216
+
In order to upload a package during the publish process (and not just upload metadata), you must provide a signing key via the `--signing-private-key` option.
217
+
Attempting to upload a package without a signing key is an error because other users would not be able to install the package.
218
218
219
-
## Install the artifact
219
+
## Install the package
220
220
221
-
Now that you've published the artifact, it will show up in [`flox search`][flox-search] and [`flox show`][flox-show], and can be installed via [`flox install`][flox-install].
221
+
Now that you've published the package, it will show up in [`flox search`][flox-search] and [`flox show`][flox-show], and can be installed via [`flox install`][flox-install].
222
222
The package will appear with your username or organization name prefixed to the package name.
223
-
Let's say your username is `myuser` and the package name is `hello`, in which case the published artifact will appear as `myuser/hello` in `flox show`, `flox search`, and `flox install`.
223
+
Let's say your username is `myuser` and the package name is `hello`, in which case the published package will appear as `myuser/hello` in `flox show`, `flox search`, and `flox install`.
0 commit comments