Skip to content

Commit 6ee2ba5

Browse files
committed
edits
1 parent 6e9e80c commit 6ee2ba5

File tree

6 files changed

+40
-74
lines changed

6 files changed

+40
-74
lines changed

docs/vendor/ci-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The following are Replicated's best practices and recommendations for CI/CD:
1818

1919
* Integrate Replicated Compatibility Matrix into your CI/CD workflows to quickly create multiple different types of clusters where you can deploy and test your application. Supported distributions include OpenShift, GKE, EKS, and more. For more information, see [About Compatibility Matrix](testing-about).
2020

21-
* If you use the GitHub Actions CI/CD platform, integrate the custom GitHub actions that Replicated maintains to replace repetitive tasks related to distributing application with Replicated or using Compatibility Matrix. For more information, see [Integrating Replicated GitHub Actions](/vendor/ci-workflows-github-actions).
21+
* If you use the GitHub Actions CI/CD platform, integrate the custom GitHub actions that Replicated maintains to replace repetitive tasks related to distributing application with Replicated or using Compatibility Matrix. For more information, see [Use Replicated GitHub Actions in CI/CD](/vendor/ci-workflows-github-actions).
2222

2323
* To help show you are conforming to a secure supply chain, sign all commits and container images. Additionally, provide a verification mechanism for container images.
2424

docs/vendor/ci-workflows.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This topic provides Replicated's recommended development and release workflows f
88

99
Replicated recommends that you maintain unique CI/CD workflows for development (continuous integration) and for releasing your software (continuous delivery). The development and release workflows in this topic describe the recommended steps and jobs to include in your own workflows, including how to integrate Replicated Compatibility Matrix into your workflows for testing. For more information about Compatibility Matrix, see [About Compatibility Matrix](testing-about).
1010

11-
For each step, the corresponding Replicated CLI command is provided. Additionally, for users of the GitHub Actions platform, a corresponding custom GitHub action that is maintained by Replicated is also provided. For more information about using the Replicated CLI, see [Install the Replicated CLI](/reference/replicated-cli-installing). For more information about the Replicated GitHub actions, see [Integrating Replicated GitHub Actions](ci-workflows-github-actions).
11+
For each step, the corresponding Replicated CLI command is provided. Additionally, for users of the GitHub Actions platform, a corresponding custom GitHub action that is maintained by Replicated is also provided. For more information about using the Replicated CLI, see [Install the Replicated CLI](/reference/replicated-cli-installing). For more information about the Replicated GitHub actions, see [Use Replicated GitHub Actions in CI/CD](ci-workflows-github-actions).
1212

1313
:::note
1414
How you implement CI/CD workflows varies depending on the platform, such as GitHub, GitLab, CircleCI, TravisCI, or Jenkins. Refer to the documentation for your CI/CD platform for additional guidance on how to create jobs and workflows.

docs/vendor/testing-how-to.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ If you use GitHub Actions as your CI/CD platform, you can include these custom a
300300
301301
To view all the available GitHub actions that Replicated maintains, see the [replicatedhq/replicated-actions](https://github.com/replicatedhq/replicated-actions/) repository in GitHub.
302302
303-
For more information, see [Integrating Replicated GitHub Actions](/vendor/ci-workflows-github-actions).
303+
For more information, see [Use Replicated GitHub Actions in CI/CD](/vendor/ci-workflows-github-actions).
304304
305305
### Recommended Workflows
306306

scripts/README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,35 @@ This script updates cross-reference link text throughout the documentation to ma
1111
#### Usage
1212

1313
1. Edit the `patterns` array in the script to include the search and replacement patterns in the format `"[old title]:[new title]"`
14-
2. Run the script from the root of the repository:
14+
15+
Example:
16+
```bash
17+
patterns=(
18+
"Integrating Replicated GitHub Actions:Use Replicated GitHub Actions in CI/CD"
19+
)
20+
```
21+
22+
2. Run the script from the root of the replicated-docs repository:
1523
```
1624
bash scripts/update_docs_links.sh
1725
```
26+
1827
3. Review the changes with `git diff`
1928
4. Run `npm run build` to verify that links still work
2029
5. Commit the changes
2130

2231
#### Features
2332

2433
- Updates both "see [Title]" and "See [Title]" references
25-
- Searches in docs/reference, docs/enterprise, docs/partials, and docs/vendor directories
34+
- Searches in all markdown files under the docs directory
2635
- Excludes .history directories from the search
36+
- Reports the number of files processed and replacements made
37+
38+
#### Troubleshooting
39+
40+
If the script isn't working as expected:
41+
- Make sure your pattern is correctly formatted with a colon separating the old and new titles
42+
- Check that the exact text matches what's in the documentation
2743

2844
## Adding New Scripts
2945

scripts/update_docs_links.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,22 @@ echo "Updating cross-references..."
77

88
# Define replacement patterns with the format "[search pattern]:[replacement]"
99
patterns=(
10-
# "Adding Nodes to kURL Clusters:Add Nodes to kURL Clusters"
10+
"Integrating Replicated GitHub Actions:Use Replicated GitHub Actions in CI/CD"
11+
# Add more patterns here as needed, one per line
12+
# "Old Title:New Title"
1113
)
1214

13-
# # Count of files processed and replacements made
14-
# files_processed=0
15-
# replacements_made=0
15+
# Count of files processed and replacements made
16+
files_processed=0
17+
replacements_made=0
1618

1719
echo "Searching in the /docs directory..."
1820

19-
# Process each file in the docs directory
20-
# Exclude .history
21-
find docs -type f -name "*.md*" -not -path "*/\.history/*" | while read file; do
21+
# Get all markdown files, excluding .history directories
22+
files=$(find docs -type f -name "*.md*" -not -path "*/\.history/*")
23+
24+
# Process each file without using a pipe to avoid subshell issues
25+
for file in $files; do
2226
file_modified=false
2327

2428
# Process each replacement pair
@@ -28,26 +32,26 @@ find docs -type f -name "*.md*" -not -path "*/\.history/*" | while read file; do
2832

2933
# Check if file contains the pattern
3034
if grep -q "see \[${search}\]" "$file" || grep -q "See \[${search}\]" "$file"; then
31-
# Make the replacements
32-
sed -i '' "s/see \[${search}\]/see \[${replacement}\]/g" "$file"
33-
sed -i '' "s/See \[${search}\]/See \[${replacement}\]/g" "$file"
35+
# Make the replacements - use | as delimiter instead of / to avoid issues with paths
36+
sed -i '' "s|see \[${search}\]|see \[${replacement}\]|g" "$file"
37+
sed -i '' "s|See \[${search}\]|See \[${replacement}\]|g" "$file"
3438

3539
echo "In $file:"
3640
echo " Replaced: '$search' → '$replacement'"
3741

3842
file_modified=true
39-
((replacements_made++))
43+
replacements_made=$((replacements_made+1))
4044
fi
4145
done
4246

43-
if $file_modified; then
44-
((files_processed++))
47+
if [ "$file_modified" = true ]; then
48+
files_processed=$((files_processed+1))
4549
fi
4650
done
4751

4852
echo "Done!"
49-
# echo "Files processed: $files_processed"
50-
# echo "Total replacements made: $replacements_made"
53+
echo "Files processed: $files_processed"
54+
echo "Total replacements made: $replacements_made"
5155
# Instructions for verifying changes
5256
echo "Next steps:"
5357
echo "1. Review the changes using 'git diff'"

update_docs_links.sh

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)