diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..9814d300 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @jenkinsci/amazon-ecs-plugin-developers diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..978c2925 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file +--- +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 00000000..c5eb6cff --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,4 @@ +# https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc +--- +_extends: .github +tag-template: amazon-ecs-$NEXT_MINOR_VERSION diff --git a/.github/workflows/jenkins-security-scan.yml b/.github/workflows/jenkins-security-scan.yml new file mode 100644 index 00000000..69374cb9 --- /dev/null +++ b/.github/workflows/jenkins-security-scan.yml @@ -0,0 +1,24 @@ +# Jenkins Security Scan +# For more information, see: https://www.jenkins.io/doc/developer/security/scan/ +--- +name: Jenkins Security Scan + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: + +permissions: + security-events: write + contents: read + actions: read + +jobs: + security-scan: + uses: jenkins-infra/jenkins-security-scan/.github/workflows/jenkins-security-scan.yaml@v2 + with: + java-cache: 'maven' + java-version: 17 diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 00000000..c9a10076 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,16 @@ +# Automates creation of Release Drafts using Release Drafter +# More Info: https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.adoc +--- +on: + push: + branches: + - master + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml new file mode 100644 index 00000000..1f363640 --- /dev/null +++ b/.mvn/extensions.xml @@ -0,0 +1,7 @@ + + + io.jenkins.tools.incrementals + git-changelist-maven-extension + 1.7 + + diff --git a/.mvn/maven.config b/.mvn/maven.config new file mode 100644 index 00000000..2a0299c4 --- /dev/null +++ b/.mvn/maven.config @@ -0,0 +1,2 @@ +-Pconsume-incrementals +-Pmight-produce-incrementals diff --git a/Jenkinsfile b/Jenkinsfile index 48bf230e..8b7fd8d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1 +1,4 @@ -buildPlugin() \ No newline at end of file +buildPlugin(useContainerAgent: true, configurations: [ + [platform: 'linux', jdk: 21], + [platform: 'windows', jdk: 17], +]) diff --git a/pom.xml b/pom.xml index 431e1e07..5c9da535 100644 --- a/pom.xml +++ b/pom.xml @@ -21,25 +21,30 @@ org.jenkins-ci.plugins plugin - 4.31 + 4.72 com.cloudbees.jenkins.plugins amazon-ecs - 1.49-SNAPSHOT + ${revision}${changelist} hpi Amazon Elastic Container Service (ECS) / Fargate plugin Jenkins plugin to run dynamic agents in a Amazon ECS/Docker environment - https://github.com/jenkinsci/amazon-ecs-plugin + https://github.com/jenkinsci/${project.artifactId}-plugin + + + + MIT License + https://opensource.org/license/mit/ + + - 2.289.1 - 8 - 3.12.4 - 1.8 - 1.8 - 1.12.287-357.vf82d85a_6eefd + 1.49 + -SNAPSHOT + 2.387.3 + jenkinsci/${project.artifactId}-plugin @@ -56,10 +61,10 @@ - scm:git:git://github.com/jenkinsci/amazon-ecs-plugin.git - scm:git:git@github.com:jenkinsci/amazon-ecs-plugin.git - https://github.com/jenkinsci/amazon-ecs-plugin - amazon-ecs-1.21 + scm:git:https://github.com/${gitHubRepo}.git + scm:git:git@github.com:${gitHubRepo}.git + https://github.com/${gitHubRepo} + ${scmTag} @@ -91,8 +96,8 @@ io.jenkins.tools.bom - bom-2.303.x - 1036.v9f5a1aba8fab + bom-2.387.x + 2357.v1043f8578392 import pom @@ -101,90 +106,58 @@ - - org.jenkins-ci.plugins.aws-java-sdk - aws-java-sdk-minimal - ${aws-java-sdk.version} - - - org.jenkins-ci.plugins.aws-java-sdk - aws-java-sdk-ecs - ${aws-java-sdk.version} - - - org.jenkins-ci.plugins.aws-java-sdk - aws-java-sdk-efs - ${aws-java-sdk.version} - org.jenkins-ci.plugins apache-httpcomponents-client-4-api - 4.5.13-1.0 org.jenkins-ci.plugins aws-credentials 1.32 - - org.jenkinsci.plugins - pipeline-model-extensions - 1.9.3 - true + + org.jenkins-ci.plugins + credentials-binding + org.jenkins-ci.plugins - variant - 1.4 + durable-task org.jenkins-ci.plugins structs - 1.23 org.jenkins-ci.plugins - credentials-binding - 1.27 + variant + + + org.jenkins-ci.plugins.aws-java-sdk + aws-java-sdk-ecs + + + org.jenkins-ci.plugins.aws-java-sdk + aws-java-sdk-efs + + + org.jenkins-ci.plugins.aws-java-sdk + aws-java-sdk-minimal org.jenkins-ci.plugins.workflow workflow-step-api - 2.24 - - org.jenkins-ci.plugins - durable-task - 1.34 + + + org.jenkinsci.plugins + pipeline-model-extensions + true org.mockito mockito-core - ${mockito.version} test - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - -Xlint:all - - - - - org.apache.maven.plugins - maven-release-plugin - - - pom.xml - - - - - diff --git a/src/test/java/com/cloudbees/jenkins/plugins/amazonecs/ECSCloudTest.java b/src/test/java/com/cloudbees/jenkins/plugins/amazonecs/ECSCloudTest.java index 05c7c129..d54454e0 100644 --- a/src/test/java/com/cloudbees/jenkins/plugins/amazonecs/ECSCloudTest.java +++ b/src/test/java/com/cloudbees/jenkins/plugins/amazonecs/ECSCloudTest.java @@ -10,7 +10,7 @@ import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; -import static org.mockito.Matchers.anyString; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/src/test/java/com/cloudbees/jenkins/plugins/amazonecs/pipeline/ECSTaskTemplateStepExecutionTest.java b/src/test/java/com/cloudbees/jenkins/plugins/amazonecs/pipeline/ECSTaskTemplateStepExecutionTest.java index 2c91e69b..cf8808e3 100644 --- a/src/test/java/com/cloudbees/jenkins/plugins/amazonecs/pipeline/ECSTaskTemplateStepExecutionTest.java +++ b/src/test/java/com/cloudbees/jenkins/plugins/amazonecs/pipeline/ECSTaskTemplateStepExecutionTest.java @@ -11,7 +11,7 @@ import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify;