Skip to content

Commit

Permalink
Merge pull request #17 from sonatype-nexus-community/feat/separate-ou…
Browse files Browse the repository at this point in the history
…t-graduated-projects

feat: Identify and separate our Graduated projects
  • Loading branch information
madpah authored Aug 29, 2024
2 parents 2d4f676 + 4339f9d commit f995770
Show file tree
Hide file tree
Showing 7 changed files with 189 additions and 42 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ defaults:
# Env Vars
env:
HUGO_VERSION: 0.128.0
LC_APPLICATION_ID: $(echo "${{ github.repository }}" | cut -d '/' -f2)

jobs:
# Build job
Expand Down Expand Up @@ -79,15 +78,15 @@ jobs:

- name: Install Node.js dependencies
run:
'[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci ||
true'
'[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm install
--production || true'

- name: Sonatype Lifecycle Evaluation
uses: sonatype-nexus-community/iq-github-action@v2
id: evaluate
uses: sonatype/actions/[email protected]
with:
serverUrl: ${{ secrets.SONATYPE_LIFECYCLE_URL }}
iq-server-url: ${{ vars.SONATYPE_PLATFORM_URL }}
username: ${{ secrets.SONATYPE_LIFECYCLE_USERNAME }}
password: ${{ secrets.SONATYPE_LIFECYCLE_PASSWORD }}
applicationId: ${{ env.LC_APPLICATION_ID }}
stage: Build
target: .
application-id: 'community-handbook.sonatype.com'
scan-targets: '.'
86 changes: 84 additions & 2 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,90 @@
/**
* Theme colour backgrounds
*/
.bg-accent-pinkish {
background-color: $accent-pinkish;
}

.bg-accent-hot-pink {
background-color: $accent-hot-pink;
}

.bg-accent-coral {
background-color: $accent-coral;
}

.bg-accent-tangerine {
background-color: $accent-tangerine;
}

.bg-accent-sun {
background-color: $accent-sun;
}

.bg-accent-glow {
background-color: $accent-glow;
}

.bg-accent-go {
background-color: $accent-go;
}

.bg-accent-turquoise {
background-color: $accent-turquoise;
}

.bg-accent-water {
background-color: $accent-water;
}

.text-accent-pinkish {
color: $accent-pinkish;
}

.text-accent-hot-pink {
color: $accent-hot-pink;
}

.text-accent-coral {
color: $accent-coral;
}

.text-accent-tangerine {
color: $accent-tangerine;
}

.text-accent-sun {
color: $accent-sun;
}

.text-accent-glow {
color: $accent-glow;
}

.text-accent-go {
color: $accent-go;
}

.text-accent-turquoise {
color: $accent-turquoise;
}

.text-accent-water {
color: $accent-water;
}

/**
* Project Card
*/
h4.project-card-title {
margin: 0.25rem 0;
}

/**
* Badge CSS
*/
span.badge {
background-color: $primary;
border-radius: 3px;
padding: 3px 6px;
}
}

28 changes: 19 additions & 9 deletions assets/scss/_variables_project_after_bs.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
$accent-pinkish: #a830c2;
$accent-hot-pink: #ff008c;
$accent-coral: #ff5869;
$accent-tangerine: #f28a00;
$accent-sun: #f7d636;
$accent-glow: #91f0a1;
$accent-go: #1aba73;
$accent-turquoise: #4fb2a6;
$accent-water: #2682ff;

$custom-colors: (
'accent-pinkish': #a830c2,
'accent-hot-pink': #ff008c,
'accent-coral': #ff5869,
'accent-tangerine': #f28a00,
'accent-sun': #f7d636,
'accent-glow': #91f0a1,
'accent-go': #1aba73,
'accent-turquoise': #4fb2a6,
'accent-water': #2682ff,
'accent-pinkish': $accent-pinkish,
'accent-hot-pink': $accent-hot-pink,
'accent-coral': $accent-coral,
'accent-tangerine': $accent-tangerine,
'accent-sun': $accent-sun,
'accent-glow': $accent-glow,
'accent-go': $accent-go,
'accent-turquoise': $accent-turquoise,
'accent-water': $accent-water,
);

$theme-colors: map-merge($theme-colors, $custom-colors);
7 changes: 7 additions & 0 deletions content/en/projects/graduated/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Graduated Projects
slug: graduated
weight: 75
---

These Open Source projects have graduated to become official Sonatype Product!
24 changes: 24 additions & 0 deletions data/projects/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"description": "Scan JavaScript (node.js inclusive) projects for vulnerable third-party dependencies.",
"active": true,
"flagship": true,
"graduated": false,
"graduated_link": null,
"repository": "auditjs",
"works_with": {
"ossindex": true,
Expand All @@ -21,6 +23,8 @@
"description": "Scan PHP and Composer projects for vulnerable third-party dependencies.",
"active": true,
"flagship": true,
"graduated": false,
"graduated_link": null,
"repository": "bach",
"works_with": {
"ossindex": true,
Expand All @@ -37,6 +41,8 @@
"description": "Scan RubyGems powered projects for vulnerable third-party dependencies.",
"active": true,
"flagship": true,
"graduated": false,
"graduated_link": null,
"repository": "chelsea",
"works_with": {
"ossindex": true,
Expand All @@ -52,6 +58,8 @@
"description": "Scan C projects for vulnerable third-party dependencies.",
"active": true,
"flagship": true,
"graduated": false,
"graduated_link": null,
"repository": "cheque",
"works_with": {
"ossindex": true,
Expand All @@ -67,6 +75,8 @@
"description": "Scan Python and Conda environments for vulnerable third-party dependencies.",
"active": true,
"flagship": true,
"graduated": false,
"graduated_link": null,
"repository": "jake",
"works_with": {
"ossindex": true,
Expand All @@ -84,6 +94,8 @@
"description": "Scan Golang projects for vulnerable third-party dependencies.",
"active": true,
"flagship": true,
"graduated": false,
"graduated_link": null,
"repository": "nancy",
"works_with": {
"ossindex": true,
Expand All @@ -99,6 +111,8 @@
"description": "Scan R code for vulnerable third-party dependencies.",
"active": true,
"flagship": true,
"graduated": false,
"graduated_link": null,
"repository": "oysteR",
"works_with": {
"ossindex": true,
Expand All @@ -115,6 +129,8 @@
"description": "Cargo subcommand provides a project bill of materials and identifies vulnerabilities.",
"active": true,
"flagship": true,
"graduated": false,
"graduated_link": null,
"repository": "cargo-pants",
"works_with": {
"ossindex": true,
Expand All @@ -131,6 +147,8 @@
"description": "A Gradle plugin that scans the dependencies of a Gradle project for vulnerabilities.",
"active": true,
"flagship": true,
"graduated": false,
"graduated_link": null,
"repository": "scan-gradle-plugin",
"works_with": {
"ossindex": true,
Expand All @@ -147,6 +165,8 @@
"description": "Scan base OS (debian, fedora, alpine) packages for vulnerabilities.",
"active": false,
"flagship": false,
"graduated": false,
"graduated_link": null,
"repository": "ahab",
"works_with": {
"ossindex": true,
Expand All @@ -159,6 +179,8 @@
"description": "Also known as Paul Botsco - this is our CLA Bot.",
"active": true,
"flagship": false,
"graduated": false,
"graduated_link": null,
"repository": "the-cla",
"works_with": {
"ossindex": false,
Expand All @@ -174,6 +196,8 @@
"description": "GitHub Action for invoking Sonatype Lifecycle scans.",
"active": true,
"flagship": false,
"graduated": true,
"graduated_link": "https://help.sonatype.com/en/sonatype-github-actions.html",
"repository": "iq-github-action",
"works_with": {
"ossindex": false,
Expand Down
52 changes: 34 additions & 18 deletions layouts/partials/projects/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
<div class="container">
<div class="row">
<div class="col">
<h4>
<h4 class="project-card-title">
{{ if .flagship }}
<i class="text-accent-coral fa-solid fa-flag me-2" title="Flagship Project"></i>
{{ end }}
{{ .name | markdownify }}
</h4>
</div>
<div class="col text-end">
{{ if not .active }}
<span class="badge bg-accent-water" title="This project has been archived - you can still check it out, but it is not receiving updates or maintenance.">ARCHIVED</span>
{{ else if .graduated }}
<span class="badge bg-accent-hot-pink">GRADUATED</span>
{{ end }}
{{ range .tags -}}
<span class="badge">{{ . | markdownify }}</span>
<span class="badge bg-primary">{{ . | markdownify }}</span>
{{ end -}}
</div>
</div>
Expand All @@ -34,25 +42,33 @@ <h4>
</div>
</div>
<div class="row pt-4 border-top">
<div class="col-4 text-end">
Works with:
</div>
<div class="col-4 text-center">
{{ if .works_with.ossindex }}
<a href="https://ossindex.sonatype.org/" target="_blank"><img src="{{ $ossindexlogo.RelPermalink }}" height="25" alt="Sonatype OSS Index" /></a>
{{ end }}
</div>
<div class="col-4 text-center">
{{ if .works_with.sonatype_lifecycle }}
<a href="https://www.sonatype.com/products/open-source-security-dependency-management" target="_blank"><img src="{{ $lifecyclelogo.RelPermalink }}" height="25" alt="Sonatype Lifecycle" /></a>
{{ end }}
</div>
<div class="col-4 text-end">
{{ if or (not .active) .graduated }}
Worked with:
{{ else }}
Works with:
{{ end }}
</div>
<div class="col-4 text-center">
{{ if .works_with.ossindex }}
<a href="https://ossindex.sonatype.org/" target="_blank"><img src="{{ $ossindexlogo.RelPermalink }}" height="25" alt="Sonatype OSS Index" /></a>
{{ end }}
</div>
<div class="col-4 text-center">
{{ if .works_with.sonatype_lifecycle }}
<a href="https://www.sonatype.com/products/open-source-security-dependency-management" target="_blank"><img src="{{ $lifecyclelogo.RelPermalink }}" height="25" alt="Sonatype Lifecycle" /></a>
{{ end }}
</div>
</div>
</div>
</div>
<div class="card-footer text-center">
<a href="https://github.com/sonatype-nexus-community/{{ .repository }}" target="_blank">
<img src="{{ $githublogo.RelPermalink }}" height="25" />
</a>
{{ if .graduated }}
<a href="{{ .graduated_link }}" target="_blank" rel="noopener">See official Sonatype Documentation</a>
{{else}}
<a href="https://github.com/sonatype-nexus-community/{{ .repository }}" target="_blank">
<img src="{{ $githublogo.RelPermalink }}" height="25" />
</a>
{{ end }}
</div>
</div>
19 changes: 14 additions & 5 deletions layouts/projects/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

{{ $slug := .Page.Slug }}

{{ if (and .Parent .Parent.IsHome) -}}
{{/* All Projects Page */ -}}
{{ $.Scratch.Set "projects" (where .Site.Data.projects.all "active" true) -}}
{{ $allProjects := .Site.Data.projects.all }}
{{ $allActiveProjects := where .Site.Data.projects.all "active" true }}
{{ $allArchivedProjects := where .Site.Data.projects.all "active" false }}
{{ $allFlagshipProjects := where .Site.Data.projects.all "flagship" true }}
{{ $allGraduatedProjects := where .Site.Data.projects.all "graduated" true }}

{{ if eq $slug "active" -}}
{{ $.Scratch.Set "projects" $allActiveProjects -}}
{{ else if eq $slug "archived" -}}
{{ $.Scratch.Set "projects" (where .Site.Data.projects.all "active" false) -}}
{{ $.Scratch.Set "projects" $allArchivedProjects -}}
{{ else if eq $slug "flagship" -}}
{{ $.Scratch.Set "projects" $allFlagshipProjects -}}
{{ else if eq $slug "graduated" -}}
{{ $.Scratch.Set "projects" $allGraduatedProjects -}}
{{ else -}}
{{ $.Scratch.Set "projects" (where .Site.Data.projects.all "flagship" true) -}}
{{ $.Scratch.Set "projects" $allProjects -}}
{{ end -}}

{{ .Render "content" }}
Expand Down

0 comments on commit f995770

Please sign in to comment.