Merge branch 'master' into updatecli_master_826cf2c93e438e11e9a7fc0479c71d12103331eed6633a5604ad389619ebb800
This commit is contained in:
commit
d6e636c604
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:base",
|
||||
"config:recommended",
|
||||
":semanticCommitsDisabled",
|
||||
"schedule:earlyMondays"
|
||||
],
|
||||
|
|
@ -9,5 +9,29 @@
|
|||
"labels": [
|
||||
"dependencies"
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"allowedVersions": "/^[0-9]+\\.[0-9]+\\.[0-9]+$/",
|
||||
"registryUrls": [
|
||||
"https://repo.jenkins-ci.org/public/"
|
||||
],
|
||||
"matchPackageNames": [
|
||||
"/org.jenkins-ci.main:jenkins-war/"
|
||||
]
|
||||
}
|
||||
],
|
||||
"customManagers": [
|
||||
{
|
||||
"customType": "regex",
|
||||
"fileMatch": [
|
||||
"integrations/pom.xml"
|
||||
],
|
||||
"matchStrings": [
|
||||
"<jenkins.version>(?<currentValue>.*?)</jenkins.version>"
|
||||
],
|
||||
"depNameTemplate": "org.jenkins-ci.main:jenkins-war",
|
||||
"datasourceTemplate": "maven"
|
||||
}
|
||||
],
|
||||
"rebaseWhen": "conflicted"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on JDK ${{ matrix.java }} and ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
java: [17]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
distribution: 'temurin'
|
||||
cache: 'maven'
|
||||
|
||||
- name: Build with Maven
|
||||
run: mvn -Pjacoco clean verify -B -V --no-transfer-progress ${{ matrix.flags }}
|
||||
|
||||
- name: Codecov coverage
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
file: '*jacoco.xml'
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
name: updatecli
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
# * is a special character in YAML so you have to quote this string
|
||||
# Run once a day
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
updatecli:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install updatecli
|
||||
uses: updatecli/updatecli-action@v2
|
||||
|
||||
- name: Diff
|
||||
continue-on-error: true
|
||||
run: |
|
||||
updatecli diff --config updatecli/updatecli.d --values updatecli/values.yaml
|
||||
env:
|
||||
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Apply
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
updatecli apply --config updatecli/updatecli.d --values updatecli/values.yaml
|
||||
env:
|
||||
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
// Windows controller tests crash with unexpected errors
|
||||
buildPlugin(useContainerAgent: true, forkCount: '0.5C', timeout: 360, configurations: [
|
||||
[platform: 'linux', jdk: 21],
|
||||
// Windows fails on >11 https://github.com/jenkinsci/configuration-as-code-plugin/pull/2392#issuecomment-1826296308
|
||||
[platform: 'windows', jdk: 11],
|
||||
[platform: 'windows', jdk: 17],
|
||||
])
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.jenkins.tools.bom</groupId>
|
||||
<artifactId>bom-2.452.x</artifactId>
|
||||
<artifactId>bom-2.479.x</artifactId>
|
||||
<version>${plugin-bom.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.jenkins.tools.bom</groupId>
|
||||
<artifactId>bom-2.440.x</artifactId>
|
||||
<artifactId>bom-${jenkins.baseline}.x</artifactId>
|
||||
<version>${plugin-bom.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ import hudson.Extension;
|
|||
import hudson.model.UnprotectedRootAction;
|
||||
import hudson.security.ACL;
|
||||
import hudson.security.ACLContext;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.logging.Logger;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
import org.kohsuke.stapler.StaplerRequest2;
|
||||
import org.kohsuke.stapler.StaplerResponse2;
|
||||
import org.kohsuke.stapler.interceptor.RequirePOST;
|
||||
|
||||
@Extension
|
||||
|
|
@ -42,7 +42,7 @@ public class TokenReloadAction implements UnprotectedRootAction {
|
|||
}
|
||||
|
||||
@RequirePOST
|
||||
public void doIndex(StaplerRequest request, StaplerResponse response) throws IOException {
|
||||
public void doIndex(StaplerRequest2 request, StaplerResponse2 response) throws IOException {
|
||||
String token = getReloadToken();
|
||||
|
||||
if (token == null || token.isEmpty()) {
|
||||
|
|
|
|||
7
pom.xml
7
pom.xml
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>plugin</artifactId>
|
||||
<version>4.88</version>
|
||||
<version>5.2</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
|
|
@ -39,10 +39,11 @@
|
|||
<properties>
|
||||
<changelist>999999-SNAPSHOT</changelist>
|
||||
<gitHubRepo>jenkinsci/configuration-as-code-plugin</gitHubRepo>
|
||||
<jenkins.version>2.440.3</jenkins.version>
|
||||
<jenkins.baseline>2.479</jenkins.baseline>
|
||||
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
|
||||
<tagNameFormat>configuration-as-code-@{project.version}</tagNameFormat>
|
||||
<useBeta>true</useBeta>
|
||||
<plugin-bom.version>3435.v238d66a_043fb_</plugin-bom.version>
|
||||
<plugin-bom.version>3613.v584fca_12cf5c</plugin-bom.version>
|
||||
<spotless.check.skip>false</spotless.check.skip>
|
||||
</properties>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.jenkins.tools.bom</groupId>
|
||||
<artifactId>bom-2.440.x</artifactId>
|
||||
<artifactId>bom-${jenkins.baseline}.x</artifactId>
|
||||
<version>${plugin-bom.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,18 @@
|
|||
package io.jenkins.plugins.casc;
|
||||
|
||||
import jakarta.servlet.AsyncContext;
|
||||
import jakarta.servlet.DispatcherType;
|
||||
import jakarta.servlet.RequestDispatcher;
|
||||
import jakarta.servlet.ServletContext;
|
||||
import jakarta.servlet.ServletInputStream;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
import jakarta.servlet.http.HttpUpgradeHandler;
|
||||
import jakarta.servlet.http.Part;
|
||||
import java.io.BufferedReader;
|
||||
import java.security.Principal;
|
||||
import java.util.Collection;
|
||||
|
|
@ -7,19 +20,6 @@ import java.util.Enumeration;
|
|||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import javax.servlet.AsyncContext;
|
||||
import javax.servlet.DispatcherType;
|
||||
import javax.servlet.RequestDispatcher;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletInputStream;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import javax.servlet.http.HttpUpgradeHandler;
|
||||
import javax.servlet.http.Part;
|
||||
|
||||
public class MockHttpServletRequest implements HttpServletRequest {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package io.jenkins.plugins.casc;
|
||||
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Collection;
|
||||
import java.util.Locale;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class MockHttpServletResponse implements HttpServletResponse {
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import io.jenkins.plugins.casc.misc.Env;
|
|||
import io.jenkins.plugins.casc.misc.EnvVarsRule;
|
||||
import io.jenkins.plugins.casc.misc.Envs;
|
||||
import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
|
|
@ -16,7 +17,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
param(
|
||||
[Parameter(Position = 0)]
|
||||
[string] $PomPath
|
||||
)
|
||||
|
||||
[xml]$xml = Get-Content $PomPath
|
||||
$xml.project.properties.'jenkins.version'
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
param(
|
||||
[Parameter(Position = 0)]
|
||||
[string] $PomPath,
|
||||
[Parameter(Position = 1)]
|
||||
[version] $NewVersion
|
||||
)
|
||||
|
||||
$changed = $false
|
||||
if ($null -eq $ENV:DRY_RUN) {
|
||||
$ENV:DRY_RUN = $false
|
||||
}
|
||||
|
||||
$pom = New-Object System.Xml.XmlDocument
|
||||
$pom.PreserveWhitespace = $true
|
||||
$pom.Load($PomPath)
|
||||
|
||||
[version]$CurrentVersion = $pom.project.properties.'jenkins.version'
|
||||
if ($null -ne $CurrentVersion -and $NewVersion -gt $CurrentVersion) {
|
||||
$changed = $true
|
||||
$pom.project.properties.'jenkins.version' = $NewVersion
|
||||
}
|
||||
|
||||
if ($changed) {
|
||||
Write-Output "$NewVersion"
|
||||
|
||||
if ($ENV:DRY_RUN -eq $false) {
|
||||
$utf8WithoutBom = New-Object System.Text.UTF8Encoding($false)
|
||||
$streamWriter = New-Object System.IO.StreamWriter($PomPath, $false, $utf8WithoutBom)
|
||||
$pom.Save($streamWriter)
|
||||
$streamWriter.Close()
|
||||
}
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
scms:
|
||||
github:
|
||||
kind: github
|
||||
spec:
|
||||
user: '{{ .github.user }}'
|
||||
email: '{{ .github.email }}'
|
||||
owner: '{{ .github.owner }}'
|
||||
repository: '{{ .github.repository }}'
|
||||
branch: '{{ .github.branch }}'
|
||||
username: '{{ .github.username }}'
|
||||
token: '{{ requiredEnv .github.token }}'
|
||||
sources:
|
||||
jenkins:
|
||||
name: Get Last jenkins Weekly Version
|
||||
kind: jenkins
|
||||
spec:
|
||||
release: stable
|
||||
github:
|
||||
token: '{{ requiredEnv .github.token }}'
|
||||
username: '{{ .github.username }}'
|
||||
current-jenkins:
|
||||
name: Get Current jenkins Version
|
||||
kind: shell
|
||||
spec:
|
||||
command: pwsh -NoProfile -File {{ requiredEnv "GITHUB_WORKSPACE" }}/updatecli/current-jenkins.ps1 -PomPath integrations/pom.xml
|
||||
conditions:
|
||||
jenkins:
|
||||
name: Test if Jenkins stable published
|
||||
kind: maven
|
||||
sourceid: jenkins
|
||||
spec:
|
||||
url: repo.jenkins-ci.org
|
||||
repository: releases
|
||||
groupId: org.jenkins-ci.main
|
||||
artifactId: jenkins-war
|
||||
targets:
|
||||
jenkins:
|
||||
name: Update Jenkins version
|
||||
sourceid: jenkins
|
||||
scmid: github
|
||||
kind: shell
|
||||
spec:
|
||||
command: pwsh -NoProfile -File {{ requiredEnv "GITHUB_WORKSPACE" }}/updatecli/update-jenkins.ps1 -PomPath integrations/pom.xml -NewVersion
|
||||
pullrequests:
|
||||
jenkins:
|
||||
title: Bump jenkins.version from {{ source "current-jenkins" }} to {{ source "jenkins" }}
|
||||
kind: github
|
||||
scmid: github
|
||||
targets:
|
||||
- jenkins
|
||||
spec:
|
||||
labels:
|
||||
- dependencies
|
||||
automerge: true
|
||||
mergemethod: squash
|
||||
usetitleforautomerge: true
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
github:
|
||||
user: "GitHub Actions"
|
||||
email: "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
username: "github-actions"
|
||||
token: "UPDATECLI_GITHUB_TOKEN"
|
||||
owner: "jenkinsci"
|
||||
repository: "configuration-as-code-plugin"
|
||||
branch: "master"
|
||||
Loading…
Reference in New Issue