Skip to content

Commit 39a652f

Browse files
authored
Merge branch 'main' into python-ruby-latest
2 parents f939c99 + 067f81d commit 39a652f

File tree

13 files changed

+75
-84
lines changed

13 files changed

+75
-84
lines changed

.github/workflows/build-from-fork.yaml

+14-18
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ env:
1515

1616
jobs:
1717
build:
18-
if: github.event.label.name == 'build-fork' || contains(github.event.pull_request.labels.*.name, 'build-fork')
18+
# we only want to run this job if the pull request is from a fork AND it has been given the proper label
19+
if: >-
20+
(
21+
github.event.label.name == 'build-fork' ||
22+
contains(github.event.pull_request.labels.*.name, 'build-fork')
23+
) &&
24+
github.event.pull_request.head.repo.full_name != github.repository
1925
runs-on: ubuntu-latest
2026
steps:
2127
- uses: actions/checkout@v4
@@ -27,34 +33,21 @@ jobs:
2733
with:
2834
cli_provider: 'platform'
2935

30-
- name: 'checks if branch already exists'
31-
id: buildthebranch
32-
env:
33-
PLATFORMSH_CLI_TOKEN: ${{ secrets.PLATFORMSH_CLI_TOKEN }}
34-
run: |
35-
buildbranch='true'
36-
branchExists=$(platform project:curl /environments | jq --arg branch "${{ env.BRANCH_TITLE }}" -r '.[] | select(.name | contains($branch))');
37-
if [ -n "${branchExists}" ]; then
38-
# branch already exists
39-
buildBranch='false'
40-
fi
41-
42-
echo "buildBranch=${buildbranch}" >> $GITHUB_OUTPUT
4336
# Create an environment and activate it
4437
- name: 'Build a branch from the fork'
45-
if: ${{ 'true' == steps.buildthebranch.outputs.buildBranch }}
4638
env:
4739
PLATFORMSH_CLI_TOKEN: ${{ secrets.PLATFORMSH_CLI_TOKEN }}
4840
# @see activate_environment:Set environment title:env in manage-environment.yaml
4941
PR_TITLE: ${{ github.event.pull_request.title }}
5042
run: |
51-
echo "::notice::Building branch from forked PR"
43+
echo "Adding changes from forked PR to local branch"
5244
# Get most recent changes
5345
git checkout ${{ github.event.pull_request.head.sha }}
5446
5547
# Put most recent changes on the branch
5648
echo "Switching to branch ${{ env.BRANCH_TITLE }}"
57-
git switch -C ${{ env.BRANCH_TITLE }}
49+
# try to switch to the branch, and if it doesn't exist, create a new branch
50+
git switch ${{ env.BRANCH_TITLE }} 2>/dev/null || git switch -C ${{ env.BRANCH_TITLE }}
5851
5952
echo "Pushing most recent changes"
6053
git push --force origin ${{ env.BRANCH_TITLE }}
@@ -77,8 +70,11 @@ jobs:
7770
echo "::notice::Branch ${{ env.BRANCH_TITLE }} was successfully pushed to Platform.sh. Continuing..."
7871
fi
7972
73+
# if this is an existing PR then we've already changed the title to be more descriptive, so we need id as well
74+
# to match the original branch name. In addition, if it is an existing PR, then the environment will be in the
75+
# process of being built and therefore will have a status of 'In progress'
8076
# If environment not active, activate it
81-
if ! $(platform environments --format plain --columns title,status | grep '${{ env.BRANCH_TITLE }}' | grep -q Active); then
77+
if ! $(platform environments --format plain --columns id,title,status | grep '${{ env.BRANCH_TITLE }}' | grep -Eq '(In progress|Active)'); then
8278
echo "::notice::Updating Platform.sh environment title for better tracking..."
8379
# in this case we DO want to statically include `pr-##` since we're referring to a pull request number
8480
newTitle="(pr-${{ github.event.number }}) ${PR_TITLE}"

.github/workflows/comment-on-pr.yaml

-37
This file was deleted.

.github/workflows/pr-url-and-dependent.yaml

+21-14
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ jobs:
170170
state: '${{ steps.set-status-message.outputs.status_state }}'
171171

172172
report_changed_files:
173-
name: Collect a list of changed files
173+
name: Collects a list of changed files, reports their URL as a comment
174174
needs:
175175
- get_info_on_pr
176176
- get_pr_url
@@ -187,11 +187,10 @@ jobs:
187187
- uses: actions/checkout@v4
188188
with:
189189
fetch-depth: 0
190-
- name: Make artifact files
190+
- name: Make pr_comment.txt file
191191
run: |
192-
# these are used in comment-on-pr
193-
touch pr_number.txt pr_comment.txt
194-
echo "${{ env.PRNUM }}" > pr_number.txt
192+
# we need this for the later action
193+
touch pr_comment.txt
195194
- name: Get changed files
196195
id: changed-files
197196
uses: tj-actions/changed-files@v41
@@ -274,13 +273,11 @@ jobs:
274273
run: |
275274
echo -e "Your Platform.sh environment has successfully deployed. :rocket:\n\nSee the site:\n\n- [Platform.sh docs]($ENV_URL)\n- [Upsun docs]($UPSUN_ENV_URL)" > pr_comment.txt
276275
277-
- uses: actions/upload-artifact@v4
276+
- name: Post PR comment
277+
uses: marocchino/sticky-pull-request-comment@v2
278278
with:
279-
name: pr-comment-info
280-
path: |
281-
pr_comment.txt
282-
pr_number.txt
283-
retention-days: 1
279+
number: ${{ env.PRNUM }}
280+
path: pr_comment.txt
284281

285282
run-redirection-tests:
286283
name: Verify contracted redirections
@@ -329,10 +326,13 @@ jobs:
329326
# if it isn't `success` then no matter what it was it's a failure
330327
state="failure"
331328
message="Redirection verifications failed. Please see run summary."
332-
# @todo do we really need a second error annotation here?
333-
echo "::error::Redirection verification failed. Please see run log."
329+
if [ 'skipped' = ${{ needs.run-redirection-tests.result }} ] && [ 'false' = '${{ needs.get_info_on_pr.outputs.continuetests }}' ]; then
330+
message="Redirection tests can not run on forks until approved."
331+
fi
334332
fi
335333
334+
echo "::warning::${message}"
335+
336336
echo "message=${message}" >> $GITHUB_OUTPUT
337337
echo "state=${state}" >> $GITHUB_OUTPUT
338338
@@ -405,11 +405,18 @@ jobs:
405405
run: |
406406
if [ 'success' = '${{ needs.run-e2e-test.result }}' ]; then
407407
message="All E2E tests passed."
408+
state="success"
408409
else
410+
state="failure"
409411
message="One or more E2E tests failed. See run summary."
412+
if [ 'skipped' = '${{ needs.run-e2e-test.result }}' ] && [ 'false' = '${{ needs.get_info_on_pr.outputs.continuetests }}' ]; then
413+
message="E2E tests can not be run on forks until approved."
414+
fi
410415
fi
411416
417+
echo "::warning::${message}"
412418
echo "message=${message}" >> $GITHUB_OUTPUT
419+
echo "state=${state}" >> $GITHUB_OUTPUT
413420
- name: Report matrix status
414421
uses: ./.github/actions/report-status
415422
if: always()
@@ -420,5 +427,5 @@ jobs:
420427
run_id: '${{ github.run_id }}'
421428
head_sha: '${{ needs.get_info_on_pr.outputs.headsha }}'
422429
status_description: '${{ steps.set-status-and-messages.outputs.message }}'
423-
state: '${{ needs.run-e2e-test.result }}'
430+
state: '${{ steps.set-status-and-messages.outputs.state }}'
424431

CONTRIBUTING.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,10 @@ To ensure the docs work smoothly, a few checks run on each pull request:
175175
./bin/htmltest
176176
```
177177

178-
- Custom workflows [check all changed files](./.github/workflows/pr-url-and-dependent.yaml) within `docs/src`
179-
and [comment with links](./.github/workflows/comment-on-pr.yaml) to the deployed pages for review.
178+
- Custom workflows check all changed files within `docs/src`
179+
and comment with links to the deployed pages for review.
180+
- Checks redirection links that start with `/anchor`
181+
- Runs a series of end-to-end tests to ensure search is working properly
180182

181183
Outside of pull requests, twice a week [Muffet](https://github.com/raviqqe/muffet)
182184
checks if all links on the site are valid.

shared/data/registry.json

+1
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@
976976
"3.5"
977977
],
978978
"supported": [
979+
"4.1",
979980
"4.0",
980981
"3.13",
981982
"3.12"

sites/platform/config/_default/config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ security:
115115
getenv:
116116
- ^GITHUB_
117117
- ^HUGO_HEAP_ID
118+
- ^PENDO_ID
118119
http:
119120
methods:
120121
- GET

sites/platform/src/add-services/opensearch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To update the versions in this table, use docs/data/registry.json
4040
On Grid and {{% names/dedicated-gen-3 %}}, from version 2, you only specify the major version.
4141
The latest compatible minor version and patches are applied automatically. On Grid, version 1 represents a rolling release - the latest minor version available from the upstream (starting with opensearch 1.3).
4242

43-
You can see the latest minor and patch versions of OpenSearch available from the [`2.x`](https://opensearch.org/lines/2x.html) and [`1.x`](https://opensearch.org/lines/1x.html) release lines.
43+
You can see the latest minor and patch versions of OpenSearch available from the [`2.x`](https://docs.opensearch.org/lines/2x.html) and [`1.x`](https://docs.opensearch.org/lines/1x.html) release lines.
4444

4545
## Deprecated versions
4646

sites/platform/src/administration/users.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,10 @@ For more information on project access control, see how to [manage project users
221221

222222
### Organization permissions
223223

224-
As an organization owner or an organization user with the **Manage users** permission,
225-
you can invite other users to your organization and grant them the following permissions:
224+
As an organization owner or an organization user with the **Manage users** permission, you can invite other users to your organization and grant them the following permissions:
226225

226+
- **Admin** (`owner`):
227+
Manage the organization and access all organization permissions, including all listed below.
227228
- **Manage billing** (`billing`):
228229
Add, remove, and edit billing information.
229230
Access invoices and vouchers.

sites/upsun/config/_default/config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ security:
122122
getenv:
123123
- ^GITHUB_
124124
- ^HUGO_HEAP_ID
125+
- ^PENDO_ID
125126
http:
126127
methods:
127128
- GET

sites/upsun/src/add-services/opensearch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The latest compatible minor version and patches are applied automatically.
2020

2121
{{< image-versions image="opensearch" status="supported" environment="grid" >}}
2222

23-
You can see the latest minor and patch versions of OpenSearch available from the [`2.x`](https://opensearch.org/lines/2x.html) and [`1.x`](https://opensearch.org/lines/1x.html) (1.3) release lines.
23+
You can see the latest minor and patch versions of OpenSearch available from the [`2.x`](https://docs.opensearch.org/lines/2x.html) and [`1.x`](https://docs.opensearch.org/lines/1x.html) (1.3) release lines.
2424

2525
## Deprecated versions
2626

sites/upsun/src/administration/users.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ For more information on project access control, see how to [manage project users
234234
As an organization owner or an organization user with the **Manage users** permission,
235235
you can invite other users to your organization and grant them the following permissions:
236236

237+
- **Admin** (`owner`):
238+
Manage the organization and access all organization permissions, including all listed below.
237239
- **Manage billing** (`billing`):
238240
Add, remove, and edit billing information.
239241
Access invoices and vouchers.
240242
Users with this permission receive monthly invoices by email.
241-
- **Manage plans** (`plans`):
242-
Access to update settings of existing projects in an organization.
243243
- **Manage users** (`members`):
244244
Add, remove, and edit organization-level users and permissions, except their own.
245245
Users with this permission can't grant other users permissions that they themselves don't have.

sites/upsun/src/learn/overview/yaml/yaml-structure.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ This YAML file is located in your ``.{{% vendor/cli %}}`` directory, at the root
1818
| └── {{< vendor/configfile "apps" "strip" >}}
1919
└── <SOURCE_CODE>
2020
```
21-
## Mandatory top-level keys
22-
In the ``config.yaml`` file, there are only three mandatory top-level YAML keys:
21+
## Top-level keys
22+
In the ``config.yaml`` file, there are three top-level YAML keys:
2323
- ``applications``: this section of the file contains all of your [app definitions](/create-apps/app-reference/single-runtime-image.md)
24+
25+
{{% note %}}
26+
Note that ``applications`` is a **mandatory** top-level key to include in your ``config.yaml`` file.
27+
{{% /note %}}
28+
2429
- ``routes``: this section of the file contains all of your [route definitions](/define-routes/_index.md) (for each of your apps)
2530
- ``services``: this section of the file contains all of your [service definitions](/add-services/_index.md) (for each of your apps)
2631

@@ -50,7 +55,7 @@ Any YAML files located at the first level of your ``.upsun`` folder, at the root
5055
The following rules apply to YAML files contained in the ``.upsun`` folder:
5156
5257
- All the existing YAML files located at the first level of the ``.upsun`` folder are taken into account.
53-
- All the existing YAML files located at the first level of the ``.upsun`` folder must feature the [mandatory top-level keys](#mandatory-top-level-keys), and must contain a [valid YAML configuration](/create-apps/app-reference/single-runtime-image.md).
58+
- All the existing YAML files located at the first level of the ``.upsun`` folder must feature the [mandatory top-level keys](#top-level-keys), and must contain a [valid YAML configuration](/create-apps/app-reference/single-runtime-image.md).
5459
- All the YAML files in subdirectories of the ``.upsun`` folder need to be [manually imported](/learn/overview/yaml/platform-yaml-tags.md#include) and contain a [valid YAML configuration](/create-apps/app-reference/single-runtime-image.md).
5560
5661
{{% note title="Warning" theme="warning"%}}

themes/psh-docs/layouts/_default/baseof.html

+18-4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<div class="grid md:grid-cols-10 divide-x-4 mt-24 print:mt-4 print:block print:mx-2"
1414
{{ if eq .Section "get-started" }}
1515
{{ if eq $.Site.Params.vendor.name "Platform.sh" }}
16-
x-data="{
16+
x-data="{
1717
stack: new URLSearchParams(location.search).get('stack') || 'php',
18-
switchStack(targetStack) {
18+
switchStack(targetStack) {
1919
this.stack = targetStack
2020
const url = new URL(window.location.href);
2121
@@ -28,7 +28,7 @@
2828
history.pushState(null, document.title, url.toString());
2929
},
3030
frametech: 'default',
31-
switchFrametech(targetFrametech) {
31+
switchFrametech(targetFrametech) {
3232
this.frametech = targetFrametech;
3333
}
3434
}"
@@ -40,7 +40,7 @@
4040

4141
<!-- Main content block -->
4242
<main class="md:col-span-8 xl:max-w-[120ch] xl:text-lg px-4 md:pr-0 md:pl-8 pt-4 pb-12 print:border-none print:max-w-full xl:print:max-w-full print:text-sm xl:print:text-sm">
43-
43+
4444
{{- block "main" . }}{{- end }}
4545
</main>
4646

@@ -57,5 +57,19 @@
5757
</script>
5858
{{ end }}
5959

60+
{{- $pendoid := os.Getenv "PENDO_ID" -}}
61+
{{ with $pendoid }}
62+
<script>
63+
(function(apiKey){
64+
(function(p,e,n,d,o){var v,w,x,y,z;o=p[d]=p[d]||{};o._q=o._q||[];
65+
v=['initialize','identify','updateOptions','pageLoad','track'];for(w=0,x=v.length;w<x;++w)(function(m){
66+
o[m]=o[m]||function(){o._q[m===v[0]?'unshift':'push']([m].concat([].slice.call(arguments,0)));};})(v[w]);
67+
y=e.createElement(n);y.async=!0;y.src='https://cdn.eu.pendo.io/agent/static/'+apiKey+'/pendo.js';
68+
z=e.getElementsByTagName(n)[0];z.parentNode.insertBefore(y,z);})(window,document,'script','pendo');
69+
pendo.initialize({});
70+
})('{{ $pendoid }}');
71+
</script>
72+
{{ end }}
73+
6074
</body>
6175
</html>

0 commit comments

Comments
 (0)