-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infra: add set up for blog #11981
Merged
Merged
infra: add set up for blog #11981
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
oss-fuzz-blog | ||
hugo-coder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
################################################################################ | ||
FROM python:3.11-bullseye | ||
|
||
# Allow statements and log messages to immediately appear in the Knative logs | ||
ENV PYTHONUNBUFFERED True | ||
|
||
RUN mkdir -p hugo-bin && \ | ||
cd hugo-bin && \ | ||
wget https://github.com/gohugoio/hugo/releases/download/v0.126.1/hugo_extended_0.126.1_linux-amd64.tar.gz && \ | ||
tar -xzf hugo_extended_0.126.1_linux-amd64.tar.gz | ||
|
||
ENV PATH="${PATH}:/hugo-bin/" | ||
|
||
RUN git clone https://github.com/luizdepra/hugo-coder hugo-coder && \ | ||
cd hugo-coder && \ | ||
git checkout 759cc945636473d251a28597e2007cbb7d11631d # 17th May 2024 | ||
|
||
COPY content /content | ||
COPY hugo.toml /hugo.toml | ||
COPY build_blog.sh /build_blog.sh | ||
RUN /build_blog.sh | ||
|
||
CMD exec python3 -m http.server 8011 -d /oss-fuzz-blog/page/public | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash -eux | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
################################################################################ | ||
|
||
BASE=$PWD | ||
|
||
if [ -d "${BASE}/hugo-coder" ] | ||
then | ||
echo "Local version of hugo exists. Using this." | ||
else | ||
# When writing the blog outeside of docker we clone Hugo here. | ||
git clone https://github.com/luizdepra/hugo-coder hugo-coder | ||
cd hugo-coder | ||
git checkout 759cc945636473d251a28597e2007cbb7d11631d # 17th May 2024 | ||
cd ../ | ||
fi | ||
|
||
# Build the site | ||
if [ -d "${BASE}/oss-fuzz-blog" ] | ||
then | ||
rm -rf ${BASE}/oss-fuzz-blog | ||
fi | ||
mkdir oss-fuzz-blog | ||
cd oss-fuzz-blog | ||
|
||
hugo new site page | ||
cd page | ||
|
||
git init | ||
|
||
# Copy over our content | ||
cp -rf ${BASE}/hugo-coder themes/hugo-coder | ||
cp $BASE/hugo.toml . | ||
rm -rf ./content | ||
cp -rf $BASE/content . | ||
|
||
# Build the site | ||
hugo -D | ||
|
||
# Uncomment the following to launch site automatically | ||
#python3 -m http.server 8011 -d ./oss-fuzz-blog/page/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
+++ | ||
title = "About" | ||
description = "OSS-Fuzz's blog" | ||
date = "2024-05-20" | ||
aliases = ["about-us", "about-oss-fuzz", "contact"] | ||
author = "OSS-Fuzz maintainers" | ||
+++ | ||
|
||
This is a blog for updates, research and initiatives of the OSS-Fuzz project. | ||
OSS-Fuzz is an open source fuzzing framework focused on large scale fuzzing | ||
of open source projects. The efforts described in this blog focuses on this | ||
domain and includes both feature updates to OSS-Fuzz itself as well as insights | ||
into research and development efforts of OSS-Fuzz. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
+++ | ||
authors = ["OSS-Fuzz Maintainers"] | ||
title = "OSS-Fuzz blog" | ||
date = "2024-05-20" | ||
description = "Introduction to the OSS-Fuzz blog" | ||
tags = [ | ||
"fuzzing", | ||
"blogging", | ||
] | ||
categories = [ | ||
"introduction", | ||
] | ||
+++ | ||
|
||
Welcome to the new OSS-Fuzz blog! In this place we will publish feature | ||
updates, research efforts and all-things OSS-Fuzz related. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
seURL = '' | ||
languageCode = 'en-us' | ||
title = 'OSS-Fuzz blog' | ||
theme = 'hugo-coder' | ||
|
||
languagecode = "en" | ||
defaultcontentlanguage = "en" | ||
|
||
paginate = 20 | ||
|
||
[markup.highlight] | ||
style = "github-dark" | ||
|
||
[params] | ||
info = "Fuzzing Open Source Software at Scale" | ||
description = "OSS-Fuzz fuzzing blog" | ||
keywords = "fuzzing, vulnerability research, open source, security" | ||
avatarurl = "images/oss-fuzz-logo.png" | ||
|
||
faviconSVG = "/img/favicon.svg" | ||
favicon_32 = "/img/favicon-32x32.png" | ||
favicon_16 = "/img/favicon-16x16.png" | ||
|
||
since = 2024 | ||
|
||
enableTwemoji = true | ||
|
||
colorScheme = "auto" | ||
hidecolorschemetoggle = false | ||
|
||
[taxonomies] | ||
category = "categories" | ||
series = "series" | ||
tag = "tags" | ||
author = "authors" | ||
|
||
# Social links | ||
[[params.social]] | ||
name = "Github" | ||
icon = "fa-brands fa-github fa-2x" | ||
weight = 1 | ||
url = "https://github.com/google/oss-fuzz" | ||
|
||
# Menu links | ||
[[menu.main]] | ||
name = "Blog" | ||
weight = 1 | ||
url = "posts/" | ||
[[menu.main]] | ||
name = "About" | ||
weight = 2 | ||
url = "about/" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For our infra, we probably want to build a simple Cloud Build integration that just dumps the static site to a GCS bucket instead. We can do this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep sounds good, would you be able to do this?
/oss-fuzz-blog/page/public
holds the static website content.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we can handle this!