-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into jenkins-design-library
- Loading branch information
Showing
8 changed files
with
217 additions
and
85 deletions.
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
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
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
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
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,22 @@ | ||
#!/bin/bash | ||
|
||
# Read the date after "Expires:" | ||
expires_date=$(grep -oP 'Expires: \K.*' content/.well-known/security.txt) | ||
|
||
# Convert the expires date to seconds since epoch | ||
expires_epoch=$(date -d "$expires_date" +%s) | ||
|
||
# Get the current date in seconds since epoch | ||
current_epoch=$(date +%s) | ||
|
||
# Calculate the difference in seconds (30 days * 24 hours * 60 minutes * 60 seconds) | ||
one_month_seconds=$((30 * 24 * 60 * 60)) | ||
|
||
# Check if the current date is less than one month close to the expires date | ||
if (( current_epoch + one_month_seconds >= expires_epoch )); then | ||
# Add one year to the expires date | ||
new_expires_date=$(date -u -d "$expires_date + 1 year" +%Y-%m-%dT%H:%M:%S.000Z) | ||
echo "$new_expires_date" | ||
else | ||
echo "$expires_date" | ||
fi |
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,114 @@ | ||
--- | ||
name: Bumps the ruby docker images versions in the documentation | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
user: "{{ .github.user }}" | ||
email: "{{ .github.email }}" | ||
owner: "{{ .github.owner }}" | ||
repository: "{{ .github.repository }}" | ||
token: "{{ requiredEnv .github.token }}" | ||
username: "{{ .github.username }}" | ||
branch: "{{ .github.branch }}" | ||
ruby: | ||
kind: github | ||
spec: | ||
user: "{{ .github.user }}" | ||
email: "{{ .github.email }}" | ||
owner: "ruby" | ||
repository: "ruby" | ||
token: "{{ requiredEnv .github.token }}" | ||
username: "{{ .github.username }}" | ||
branch: "{{ .github.branch }}" | ||
|
||
sources: | ||
alpineLatestVersion: | ||
kind: githubrelease | ||
name: "Get the latest Alpine Linux version" | ||
spec: | ||
owner: "alpinelinux" | ||
repository: "aports" # Its release process follows Alpine's | ||
token: "{{ requiredEnv .github.token }}" | ||
username: "{{ .github.username }}" | ||
versionfilter: | ||
kind: semver | ||
pattern: "~3" | ||
transformers: | ||
- findsubmatch: | ||
pattern: >- | ||
v(.*)(\.\d+) | ||
captureindex: 1 | ||
rubyDockerImageLatestVersion: | ||
kind: dockerimage | ||
name: "Get the latest Ruby version" | ||
spec: | ||
image: "ruby" | ||
tagFilter: >- | ||
\d\.\d\.\d$ | ||
versionfilter: | ||
kind: regex | ||
pattern: >- | ||
\d\.\d\.\d$ | ||
rubyLatestVersion: | ||
kind: gittag | ||
name: "Get the latest Ruby version" | ||
scmid: ruby | ||
spec: | ||
versionfilter: | ||
kind: regex | ||
pattern: >- | ||
v3_\d+\d+$ | ||
transformers: | ||
- removesuffix: "v" | ||
|
||
conditions: | ||
testRubyAlpineImagePublished: | ||
name: "Test ruby:3.x.x-alpine-3.xx docker image tag" | ||
kind: dockerimage | ||
disablesourceinput: true | ||
spec: | ||
image: "ruby" | ||
tag: '{{ source "rubyDockerImageLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}' | ||
testRubyAlpineArg: | ||
name: "Does the 'Hello World!' tutorial have a reference to the ruby alpine image?" | ||
kind: file | ||
disablesourceinput: true | ||
spec: | ||
file: content/doc/pipeline/tour/hello-world.adoc | ||
matchpattern: >- | ||
.*agent.*docker.*image.*ruby:.* | ||
targets: | ||
updateHelloWorldTutorialRubyPipeline: | ||
name: "Update the value of the ruby docker image for pipelines in the 'Hello World!' tutorial" | ||
kind: file | ||
sourceid: rubyLatestVersion | ||
spec: | ||
file: content/doc/pipeline/tour/hello-world.adoc | ||
matchpattern: >- | ||
(.*agent.*docker.*image.*\')ruby:(.*)(\'.*) | ||
replacepattern: >- | ||
${1}ruby:{{ source "rubyDockerImageLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}${3} | ||
scmid: default | ||
updateHelloWorldTutorialRubyScripted: | ||
name: "Update the value of the ruby docker image for scripts in the 'Hello World!' tutorial" | ||
kind: file | ||
sourceid: rubyLatestVersion | ||
spec: | ||
file: content/doc/pipeline/tour/hello-world.adoc | ||
matchpattern: >- | ||
(.*docker.*image.*\')ruby:(.*)(\'.*) | ||
replacepattern: >- | ||
${1}ruby:{{ source "rubyDockerImageLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}${3} | ||
scmid: default | ||
|
||
actions: | ||
default: | ||
kind: github/pullrequest | ||
scmid: default | ||
title: '[Ruby Tutorial] Bump ruby alpine docker image version to {{ source "rubyDockerImageLatestVersion" }}-alpine{{ source "alpineLatestVersion" }}' | ||
spec: | ||
labels: | ||
- dependencies |
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
Oops, something went wrong.