Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlesne committed Nov 25, 2023
1 parent 9ee53e3 commit c0b024e
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 102 deletions.
92 changes: 0 additions & 92 deletions .github/workflows/hugo.yaml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ env:
HADOLINT_VERSION: 2.12.0
# https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022
VS_BUILDTOOLS_WIN_VERSION: 17
# https://github.com/gohugoio/hugo/releases
HUGO_VERSION: 0.120.4

jobs:
sast-creds:
Expand Down Expand Up @@ -708,3 +710,79 @@ jobs:
${{ env.CONTAINER_REGISTRY_DOCKER_HUB }}/${{ env.CONTAINER_NAME }}:artifacthub.io \
artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml \
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml
build-hugo:
runs-on: ubuntu-22.04
needs:
- sast-creds
- sast-semgrep
- test
steps:
- name: Setup Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_linux-amd64.deb
sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Setup Dart Sass
run: sudo snap install dart-sass

- name: Checkout
uses: actions/checkout@v4.1.1
with:
submodules: recursive
fetch-depth: 0

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3.0.6

- name: Build with Hugo
working-directory: docs
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload build artifact
uses: actions/upload-artifact@v3.1.3
with:
name: hugo
path: public

deploy-hugo:
environment:
name: github-pages
runs-on: ubuntu-22.04
needs:
- build-hugo
steps:
- name: Pull from gh-pages
uses: actions/checkout@v4.1.1
with:
ref: gh-pages

- name: Clean previous Hugo build
run: |
# Clean all except Helm index
find . -type f -not -name "index.yaml" -delete
- name: Download build artifact
uses: actions/download-artifact@v3.0.2
with:
name: hugo

- name: Commit and push
run: |
# Configure git
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
# Commit and push
git add .
git commit -m "Deploy hugo site"
git push origin gh-pages
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cicd/version
docs/themes/hextra
src/helm/azure-pipelines-agent/templates
16 changes: 8 additions & 8 deletions docs/content/docs/advanced-topics/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ weight: 2
Explore the following sections to learn how to use Azure Pipelines Agent:

{{< cards >}}
{{< card link="build-aspnet-applications" title="Build ASP.NET applications" icon="code" >}}
{{< card link="build-container-images" title="Build container images" icon="archive" >}}
{{< card link="capabilities" title="Capabilities" icon="star" >}}
{{< card link="helm-values" title="Helm values" icon="adjustments" >}}
{{< card link="performance" title="Performance" icon="chart-bar" >}}
{{< card link="provided-software" title="Provided software" icon="cube" >}}
{{< card link="proxy" title="Proxy" icon="shield-check" >}}
{{< card link="custom-root-certificate" title="Custom root certificate" icon="lock-closed" >}}
{{< card link="build-aspnet-applications" title="Build ASP.NET applications" icon="code" >}}
{{< card link="build-container-images" title="Build container images" icon="archive" >}}
{{< card link="capabilities" title="Capabilities" icon="star" >}}
{{< card link="helm-values" title="Helm values" icon="adjustments" >}}
{{< card link="performance" title="Performance" icon="chart-bar" >}}
{{< card link="provided-software" title="Provided software" icon="cube" >}}
{{< card link="proxy" title="Proxy" icon="shield-check" >}}
{{< card link="custom-root-certificate" title="Custom root certificate" icon="lock-closed" >}}
{{< /cards >}}
2 changes: 1 addition & 1 deletion docs/content/docs/advanced-topics/capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Capabilities
Capabilities are declarative variables you can add to the agents, to allow developers to select the right agent for their pipeline ([official documentation](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/demands?view=azure-devops&tabs=yaml)).

{{< callout type="info" >}}
Multiple Helm instances can be deployed using the same agent pool name (see `pipelines.poolName`). It will result in a single pool with multiple capabilities. Be warning, if a capability is not unique accross the pool, all the agents will scale. This will create "zoombies" agents, scaled for nothing, waiting their timeout.
Multiple Helm instances can be deployed using the same agent pool name (see `pipelines.poolName`). It will result in a single pool with multiple capabilities. Be warning, if a capability is not unique accross the pool, all the agents will scale. This will create "zoombies" agents, scaled for nothing, waiting their timeout.
{{< /callout >}}

Disctinct the agents by capabilities. For examples:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/troubleshooting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ If the pipeline takes longer than 60 minutes, you need to change two things.
2. Increase the functional pipeline timeout in Azure DevOps. Go to `Options > Build job > Build job timeout in minutes`.

{{< callout type="info" >}}
Set a technical pipeline timeout longer than the functional pipeline timeout to avoid the system to kill the pipeline abruptly.
Set a technical pipeline timeout longer than the functional pipeline timeout to avoid the system to kill the pipeline abruptly.
{{< /callout >}}

![Configuration in the web interface.](build-job-timeout-in-minutes.png)

0 comments on commit c0b024e

Please sign in to comment.