Skip to content

Commit

Permalink
Merge branch 'master' into serverless
Browse files Browse the repository at this point in the history
  • Loading branch information
krisstern authored Dec 1, 2024
2 parents 9bd31cb + 192693b commit 895f3ca
Show file tree
Hide file tree
Showing 218 changed files with 4,115 additions and 914 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/compress-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Compress Images
on:
pull_request_target:
paths:
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.webp'
jobs:
build:
name: calibreapp/image-actions
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Compress Images
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
ignorePaths: 'content/images/avatars/**'
2 changes: 1 addition & 1 deletion .github/workflows/updatecli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@v2.67.0
uses: updatecli/updatecli-action@v2.70.0

- name: Run Updatecli in Dry Run mode
run: updatecli diff --config ./updatecli/updatecli.d --values ./updatecli/values.github-action.yaml
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.5
3.3.6
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ check-filename = false
"loLSNdCv6K4" = "loLSNdCv6K4"
"ArachnePnR" = "ArachnePnR"
"LIy90gGvmIU" = "LIy90gGvmIU"
"71Nd_6OqdQk" = "71Nd_6OqdQk"
"PNGs" = "PNGs"
"Lso" = "Lso"
"ND" = "ND"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY scripts ./scripts
RUN npm install
RUN make assets

FROM ruby:3.3.5 as builder
FROM ruby:3.3.6 as builder
ENV USE_LOCAL_RUBY=true

# throw errors if Gemfile has been modified since Gemfile.lock
Expand Down
4 changes: 1 addition & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.3.6)
strscan
rexml (3.3.9)
rouge (4.2.1)
rss (0.3.1)
rexml
Expand All @@ -120,7 +119,6 @@ GEM
sassc (2.4.0)
ffi (~> 1.9)
shellany (0.0.1)
strscan (3.1.0)
temple (0.10.0)
thor (1.2.1)
tilt (2.0.11)
Expand Down
42 changes: 24 additions & 18 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,31 @@ node('docker&&linux') {
*/
if (infra.isTrusted() && env.BRANCH_NAME == null) {
stage('Publish site') {
infra.withFileShareServicePrincipal([
servicePrincipalCredentialsId: 'trustedci_jenkinsio_fileshare_serviceprincipal_writer',
fileShare: 'jenkins-io',
fileShareStorageAccount: 'jenkinsio'
]) {
try {
infra.withFileShareServicePrincipal([
servicePrincipalCredentialsId: 'trustedci_jenkinsio_fileshare_serviceprincipal_writer',
fileShare: 'jenkins-io',
fileShareStorageAccount: 'jenkinsio'
]) {
sh '''
# Don't output sensitive information
set +x
# Synchronize the File Share content
azcopy sync \
--skip-version-check \
--recursive=true\
--delete-destination=true \
--compare-hash=MD5 \
--put-md5 \
--local-hash-storage-mode=HiddenFiles \
./build/_site/ "${FILESHARE_SIGNED_URL}"
'''
}
} catch (err) {
currentBuild.result = 'FAILURE'
// Only collect azcopy log when the deployment fails, because it is an heavy one
sh '''
# Don't output sensitive information
set +x
# Synchronize the File Share content
azcopy sync \
--skip-version-check \
--recursive=true\
--delete-destination=true \
--compare-hash=MD5 \
--put-md5 \
--local-hash-storage-mode=HiddenFiles \
./build/_site/ "${FILESHARE_SIGNED_URL}"
# Retrieve azcopy logs to archive them
cat /home/jenkins/.azcopy/*.log > azcopy.log
'''
Expand Down
2 changes: 1 addition & 1 deletion STYLEGUIDE.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ node {
// Declarative //
pipeline {
agent { docker { image 'node:20.18.0-alpine3.20' } }
agent { docker { image 'node:22.11.0-alpine3.20' } }
stages {
stage('Build') {
sh 'npm install'
Expand Down
92 changes: 51 additions & 41 deletions content/404.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ hideSearchBar: true
---

:css
.pagecontainer {
display: flex;
flex-direction: column;
flex-grow: 1;
}

.errorcontainer {
text-align: center;
}
Expand All @@ -28,46 +34,50 @@ hideSearchBar: true
margin-bottom: 30px;
}

%div.errorcontainer
%img{:src => '/images/fire-jenkins.svg'}

%h3
The page you requested could not be found.

%p
%a{:href => "/"} Back to homepage

%div.searchcontainer
%h3
Search for related pages

:javascript
// fetch last segment from URL
const path = window.location.pathname;
const pathSegments = path.split('/').filter(Boolean);
const lastSegmentIndex = pathSegments.length - 1;
const lastSegment = pathSegments[lastSegmentIndex];

const div = document.createElement('div');
div.classList.add('searchcontainer');

const scriptFileEl = document.createElement('script');
scriptFileEl.setAttribute('defer', '');
scriptFileEl.setAttribute('src', `https://cdn.jsdelivr.net/npm/@docsearch/js@3`);
document.head.appendChild(scriptFileEl);

scriptFileEl.addEventListener('load', () => {
// enable docsearch
window.docsearch({
// point it at the renderroot
container: div,
indexName: 'jenkins',
appId: "M6L7Q4Z8HS",
apiKey: "52f8dfbff76ffd9106f1c68fee16154b",
searchParameters: {
},
initialQuery: lastSegment,
%div.pagecontainer

%div.errorcontainer
%img{:src => '/images/fire-jenkins.svg'}

%h3
The page you requested could not be found.

%p
%a{:href => "/"} Back to homepage

%div.searchcontainer
%h3
Search for related pages



:javascript
// fetch last segment from URL
const path = window.location.pathname;
const pathSegments = path.split('/').filter(Boolean);
const lastSegmentIndex = pathSegments.length - 1;
const lastSegment = pathSegments[lastSegmentIndex];

const div = document.createElement('div');
div.classList.add('searchcontainer');

const scriptFileEl = document.createElement('script');
scriptFileEl.setAttribute('defer', '');
scriptFileEl.setAttribute('src', `https://cdn.jsdelivr.net/npm/@docsearch/js@3`);
document.head.appendChild(scriptFileEl);

scriptFileEl.addEventListener('load', () => {
// enable docsearch
window.docsearch({
// point it at the renderroot
container: div,
indexName: 'jenkins',
appId: "M6L7Q4Z8HS",
apiKey: "52f8dfbff76ffd9106f1c68fee16154b",
searchParameters: {
},
initialQuery: lastSegment,
});
});
});

document.body.append(div);
document.body.append(div);
6 changes: 6 additions & 0 deletions content/_data/adopters/Alauda.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: "Alauda"
url: https://www.alauda.io/
detailsUrl: https://github.com/alauda/alauda-devops-sync-plugin
detailsLinkText: Project
---
Loading

0 comments on commit 895f3ca

Please sign in to comment.