Skip to content

Commit f95ab80

Browse files
Enterprise workspaces description (#3354)
* Create workspaces-eom.md initial version * workspaces settings picture * Update workspaces-eom.md added config info * Update workspaces-eom.md formattign and further reading references * Update enterprise_sidebar.html adding workspaces & cache to enterprise sidebar * Update using-workspaces.md added additional exampel of using multiple workspaces * Update sidebar.html with roskpaces reference
1 parent 896b682 commit f95ab80

File tree

5 files changed

+110
-5
lines changed

5 files changed

+110
-5
lines changed

_includes/enterprise_sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ <h3>Enterprise Operations Manual</h3>
6363
<li><a href="/user/enterprise/troubleshooting-guide/">Troubleshooting Guide</a></li>
6464
<li><a href="/user/enterprise/user-management/">User Management</a></li>
6565
<li><a href="/user/enterprise/Multi-CPU-Builds/">Multi CPU builds</a></li>
66+
<li><a href="/user/enterprise/workspaces-eom/">Workspaces & Cache</a></li>
6667
</ul>
6768

6869
<h3>Migrating from Enterprise 2.x to 3.x</h3>

_includes/sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ <h3>Installing Dependencies</h3>
5959
<li><a href="/user/private-dependencies-bb/">Private Dependencies Bitbucket</a></li>
6060
<li><a href="/user/database-setup/">Setting up Services and Databases</a></li>
6161
<li><a href="/user/caching/">Caching Dependencies</a></li>
62+
<li><a href="/user/using-workspaces/">Caching Dependencies within a Build (Workspaces)</a></li>
6263
<li><a href="/user/ssh-known-hosts/">Adding to SSH Known Hosts</a></li>
6364
</ul>
6465

images/tcie-3.x-workspaces-config.png

216 KB
Loading

user/enterprise/workspaces-eom.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Enterprise Workspaces & Cache
3+
layout: en_enterprise
4+
5+
---
6+
7+
This page contains operations manual level information about Workspaces and Cache in Trravis CI Enterprise.
8+
9+
## Cache vs Workspaces
10+
11+
Cache, aka Build Cache, is configured file bucket which serves a purpose as a cache for build artifacts. Users of Travis CI enterprise may put or pull to/from the Cache the build artifacts.
12+
**Cache is meant for utilizing items between builds**.
13+
14+
Workspaces, aka Build Workspaces, is a kind of cache, but with specific goal in mind: serves a purpose to share artifacts/files between **jobs within the same build**. The main use case is
15+
when a binary or library (or other dependency) requires rebuilding before any other build job within build may progress. Workspaces are introduced in Travis CI Enterprise after [version 3.0.53](https://enterprise-changelog.travis-ci.com/release-3-0-53-283095).
16+
17+
Both features are technically specifically configured file buckets.
18+
19+
### Workspaces configuration
20+
21+
Workspaces are configured much like Cache - in the Travis CI Enterprsie platform admin application. The configuration is technically propagated to travis-build service during runtime.
22+
23+
There's a new menu called "Workspaces UI Settings", where specific configuration items must be provided in order to enable feature for the end users.
24+
25+
![TCIE Workspaces Settings](/images/tcie-3.x-workspaces-config.png)
26+
27+
> *Please note:*
28+
>
29+
> Workspaces are meant for short-lived artifacts.
30+
>
31+
> It is recommended to:
32+
>
33+
> * use separate file bucket than the one used for cache, both for security and maintenance reasons
34+
> * have a file bucket configured with auto-cleanup policy (TCIE is not performing any housekeeping on the file bucket) - default recommended is 3 hours (maximum default time of a single job running uninterrupted under certain allowance configurations)
35+
> * make sure your infrastructure hosting build image instances has connectivity to the file bucket configured for workspaces
36+
37+
### Workspaces usage
38+
39+
Please see [our documentation](/user/using-workspaces) for end-user facing usage instructions for Workspaces.
40+
41+
Please read also [about build stages](/user/build-stages/) in order to create streamlined set of jobs, which can be used e.g. for pre-building a short lived artifact in first steps of build pipeline.

user/using-workspaces.md

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ title: Using Workspaces (Beta)
33
layout: en
44
---
55

6-
# Workspaces (Beta)
7-
8-
> Workspaces are currently in beta testing, and may change without a prior
9-
> notice.
10-
{: .beta}
6+
# Workspaces
117

128
Workspaces allow jobs _within_ a build to share files.
139
They are useful when you want to use build artifacts from a previous job;
@@ -94,6 +90,72 @@ In this example:
9490
produced by the jobs in the previous stage, and deploy it
9591
using a custom script.
9692

93+
A more explicit example below:
94+
95+
96+
```
97+
jobs:
98+
include:
99+
- stage: Build and Test
100+
name: "Job A"
101+
script:
102+
- echo "Building Job A"
103+
- echo "Running tests for Job A"
104+
- mkdir -p workspace-a
105+
- echo "This is data from Job A" > workspace-a/data-A.txt
106+
workspaces:
107+
create:
108+
name: workspace-a
109+
paths:
110+
- workspace-a
111+
112+
- name: "Job B"
113+
script:
114+
- echo "Building Job B"
115+
- echo "Running tests for Job B"
116+
- mkdir -p workspace-b
117+
- echo "This is data from Job B" > workspace-b/data-B.txt
118+
workspaces:
119+
create:
120+
name: workspace-b
121+
paths:
122+
- workspace-b
123+
124+
- name: "Job C"
125+
script:
126+
- echo "Building Job C"
127+
- echo "Running tests for Job C"
128+
- mkdir -p workspace-c
129+
- echo "This is data from Job C" > workspace-c/data-C.txt
130+
workspaces:
131+
create:
132+
name: workspace-c
133+
paths:
134+
- workspace-c
135+
136+
- stage: Deploy
137+
name: "Deploy"
138+
script:
139+
- echo "Deploying using artifacts from Job A Job B and Job C"
140+
- cat workspace-a/data-A.txt
141+
- cat workspace-b/data-B.txt
142+
- cat workspace-c/data-C.txt
143+
workspaces:
144+
use:
145+
- workspace-a
146+
- workspace-b
147+
- workspace-c
148+
```
149+
{: data-file=".travis.yml"}
150+
151+
In above example:
152+
153+
1. Build stage "Build and Test" consists of 3 jobs, each of them producing output to a separate workspace
154+
2. Build stage "Deploy" consists of one job, which
155+
1. Marks usage of all 3 previosuly created workspaces
156+
2. pulls data out of each previously created workspace and echoes it to standard output to demonstrate ability to access workspace
157+
158+
97159
## Workspaces and concurrency
98160
Note that workspaces work best if there is no race condition set while
99161
uploading them.

0 commit comments

Comments
 (0)