diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9f0b9ef..0f46a79b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: dist: [debian, alpine, jdk11] steps: - name: Setup BATS - uses: mig4/setup-bats@v1 + uses: bats-core/bats-action@2.0.0 - uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 865c55ee..c131fc44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -ARG FROM_TAG=2.426.3 +ARG FROM_TAG=2.462.1 FROM jenkins/jenkins:${FROM_TAG} -ARG GOSU_VERSION=1.12 +ARG GOSU_VERSION=1.17 # Install plugins COPY plugins.txt /usr/share/jenkins/ref/ @@ -32,7 +32,7 @@ RUN pip3 install --break-system-packages --no-cache-dir --upgrade pip \ && pip install --break-system-packages --no-cache-dir wheel \ && pip install --break-system-packages --no-cache-dir awscli PyYAML six requests botocore boto3 -RUN curl $CURL_OPTIONS https://releases.hashicorp.com/envconsul/0.10.0/envconsul_0.10.0_linux_amd64.tgz | tar -C /usr/bin -xvzf - && \ +RUN curl $CURL_OPTIONS https://releases.hashicorp.com/envconsul/0.13.2/envconsul_0.13.2_linux_amd64.zip -o /tmp/envconsul.zip && unzip /tmp/envconsul.zip -d /usr/bin/ && \ chmod +x /usr/bin/envconsul RUN curl $CURL_OPTIONS -o /usr/bin/gosu https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64 && \ diff --git a/LTS_VERSION.txt b/LTS_VERSION.txt index ea96749e..328df40e 100644 --- a/LTS_VERSION.txt +++ b/LTS_VERSION.txt @@ -1 +1 @@ -2.426.3 \ No newline at end of file +2.462.1 diff --git a/config-handlers/CloudsConfig.groovy b/config-handlers/CloudsConfig.groovy index 417a1d9c..44aae7ef 100644 --- a/config-handlers/CloudsConfig.groovy +++ b/config-handlers/CloudsConfig.groovy @@ -6,6 +6,7 @@ import jenkins.model.Jenkins import com.nirima.jenkins.plugins.docker.* import com.nirima.jenkins.plugins.docker.launcher.* import com.nirima.jenkins.plugins.docker.strategy.* +import io.jenkins.docker.connector.DockerComputerJNLPConnector import com.cloudbees.jenkins.plugins.amazonecs.* import static com.cloudbees.jenkins.plugins.amazonecs.ECSTaskTemplate.* @@ -116,9 +117,7 @@ def dockerCloud(config){ def dockerTemplate = new DockerTemplate( dockerTemplateBase, - new io.jenkins.docker.connector.DockerComputerJNLPConnector( - new JNLPLauncher(tunnel, temp.jvmArgs) - ), + new DockerComputerJNLPConnector(), temp.labels?.join(' '), temp.remoteFs?:'', temp.instanceCap?.toString() ?: "" diff --git a/config-handlers/CredsConfig.groovy b/config-handlers/CredsConfig.groovy index 4591e705..fbd12b61 100644 --- a/config-handlers/CredsConfig.groovy +++ b/config-handlers/CredsConfig.groovy @@ -7,6 +7,7 @@ import com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl import org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl import jenkins.model.Jenkins import hudson.util.Secret +import hudson.model.FileParameterValue import org.jenkinsci.plugins.structs.describable.DescribableModel def asInt(value, defaultValue=0){ @@ -133,7 +134,7 @@ def certCred(config){ def secretBytes = com.cloudbees.plugins.credentials.SecretBytes.fromString(base64) keyStoreSource = new com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.UploadedKeyStoreSource(secretBytes) }else if(fileOnMaster){ - keyStoreSource = new com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.FileOnMasterKeyStoreSource(fileOnMaster) + keyStoreSource = new com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.UploadedKeyStoreSource(new FileParameterValue.FileItemImpl(fileOnMaster), null) } return new com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl( CredentialsScope.GLOBAL, diff --git a/plugins.txt b/plugins.txt index 493924d6..106a9844 100644 --- a/plugins.txt +++ b/plugins.txt @@ -1,232 +1,232 @@ ace-editor:1.1 -active-directory:2.34 -amazon-ecr:1.114.vfd22430621f5 +active-directory:2.36 +amazon-ecr:1.136.v914ea_5948634 amazon-ecs:1.49 -anchore-container-scanner:1.1.2 +anchore-container-scanner:3.2.0 ansicolor:1.0.4 -ant:497.v94e7d9fffa_b_9 +ant:511.v0a_a_1a_334f41b_ antisamy-markup-formatter:162.v0e6ec0fcfcf6 apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 -apache-httpcomponents-client-5-api:5.3.1-1.0 -artifactory:4.0.3 -authentication-tokens:1.53.v1c90fd9191a_b_ -aws-credentials:218.v1b_e9466ec5da_ -aws-java-sdk-cloudformation:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-codebuild:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-ec2:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-ecr:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-ecs:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-efs:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-elasticbeanstalk:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-iam:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-kinesis:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-logs:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-minimal:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-sns:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-sqs:1.12.633-430.vf9a_e567a_244f -aws-java-sdk-ssm:1.12.633-430.vf9a_e567a_244f -aws-java-sdk:1.12.633-430.vf9a_e567a_244f -badge:1.9.1 +apache-httpcomponents-client-5-api:5.3.1-110.v77252fb_d4da_5 +artifactory:4.0.8 +authentication-tokens:1.119.v50285141b_7e1 +aws-credentials:231.v08a_59f17d742 +aws-java-sdk-cloudformation:1.12.753-463.v071a_97315959 +aws-java-sdk-codebuild:1.12.753-463.v071a_97315959 +aws-java-sdk-ec2:1.12.753-463.v071a_97315959 +aws-java-sdk-ecr:1.12.753-463.v071a_97315959 +aws-java-sdk-ecs:1.12.753-463.v071a_97315959 +aws-java-sdk-efs:1.12.753-463.v071a_97315959 +aws-java-sdk-elasticbeanstalk:1.12.753-463.v071a_97315959 +aws-java-sdk-iam:1.12.753-463.v071a_97315959 +aws-java-sdk-kinesis:1.12.753-463.v071a_97315959 +aws-java-sdk-logs:1.12.753-463.v071a_97315959 +aws-java-sdk-minimal:1.12.753-463.v071a_97315959 +aws-java-sdk-sns:1.12.753-463.v071a_97315959 +aws-java-sdk-sqs:1.12.753-463.v071a_97315959 +aws-java-sdk-ssm:1.12.753-463.v071a_97315959 +aws-java-sdk:1.12.753-463.v071a_97315959 +badge:1.13 basic-branch-build-strategies:81.v05e333931c7d blueocean-autofavorite:1.2.5 -blueocean-bitbucket-pipeline:1.27.10 -blueocean-commons:1.27.10 -blueocean-config:1.27.10 -blueocean-core-js:1.27.10 -blueocean-dashboard:1.27.10 -blueocean-display-url:2.4.2 -blueocean-events:1.27.10 -blueocean-git-pipeline:1.27.10 -blueocean-github-pipeline:1.27.10 -blueocean-i18n:1.27.10 -blueocean-jira:1.27.10 -blueocean-jwt:1.27.10 -blueocean-personalization:1.27.10 -blueocean-pipeline-api-impl:1.27.10 -blueocean-pipeline-editor:1.27.10 -blueocean-pipeline-scm-api:1.27.10 -blueocean-rest-impl:1.27.10 -blueocean-rest:1.27.10 -blueocean-web:1.27.10 -blueocean:1.27.10 +blueocean-bitbucket-pipeline:1.27.14 +blueocean-commons:1.27.14 +blueocean-config:1.27.14 +blueocean-core-js:1.27.14 +blueocean-dashboard:1.27.14 +blueocean-display-url:2.4.3 +blueocean-events:1.27.14 +blueocean-git-pipeline:1.27.14 +blueocean-github-pipeline:1.27.14 +blueocean-i18n:1.27.14 +blueocean-jira:1.27.14 +blueocean-jwt:1.27.14 +blueocean-personalization:1.27.14 +blueocean-pipeline-api-impl:1.27.14 +blueocean-pipeline-editor:1.27.14 +blueocean-pipeline-scm-api:1.27.14 +blueocean-rest-impl:1.27.14 +blueocean-rest:1.27.14 +blueocean-web:1.27.14 +blueocean:1.27.14 bootstrap4-api:4.6.0-6 -bootstrap5-api:5.3.2-3 -bouncycastle-api:2.30.1.77-225.v26ea_c9455fd9 -branch-api:2.1144.v1425d1c3d5a_7 -build-timeout:1.32 -build-user-vars-plugin:1.9 +bootstrap5-api:5.3.3-1 +bouncycastle-api:2.30.1.78.1-248.ve27176eb_46cb_ +branch-api:2.1178.v969d9eb_c728e +build-timeout:1.33 +build-user-vars-plugin:166.v52976843b_435 buildtriggerbadge:251.vdf6ef853f3f5 caffeine-api:3.1.8-133.v17b_1ff2e0599 -checkmarx:2023.4.3 -checks-api:2.0.2 +checkmarx:2024.2.3 +checks-api:2.2.0 cloud-stats:336.v788e4055508b_ -cloudbees-bitbucket-branch-source:866.vdea_7dcd3008e -cloudbees-folder:6.858.v898218f3609d +cloudbees-bitbucket-branch-source:888.v8e6d479a_1730 +cloudbees-folder:6.942.vb_43318a_156b_2 cobertura:1.17 code-coverage-api:4.99.0 -command-launcher:107.v773860566e2e -commons-lang3-api:3.13.0-62.v7d18e55f51e2 -commons-text-api:1.11.0-95.v22a_d30ee5d36 +command-launcher:115.vd8b_301cc15d0 +commons-lang3-api:3.14.0-76.vda_5591261cfe +commons-text-api:1.12.0-129.v99a_50df237f7 conditional-buildstep:1.4.3 -config-file-provider:968.ve1ca_eb_913f8c -configuration-as-code:1775.v810dc950b_514 -copyartifact:722.v0662a_9b_e22a_c -credentials-binding:657.v2b_19db_7d6e6d -credentials:1319.v7eb_51b_3a_c97b_ -cucumber-reports:5.8.1 +config-file-provider:973.vb_a_80ecb_9a_4d0 +configuration-as-code:1836.vccda_4a_122a_a_e +copyartifact:749.vfb_dca_a_9b_6549 +credentials-binding:681.vf91669a_32e45 +credentials:1371.vfee6b_095f0a_3 +cucumber-reports:5.8.3 custom-tools-plugin:0.8 -dashboard-view:2.495.v07e81500c3f2 -data-tables-api:1.13.8-2 -display-url-api:2.200.vb_9327d658781 +dashboard-view:2.508.va_74654f026d1 +data-tables-api:2.0.8-1 +display-url-api:2.204.vf6fddd8a_8b_e9 docker-build-publish:1.4.0 -docker-commons:439.va_3cb_0a_6a_fb_29 -docker-java-api:3.3.4-86.v39b_a_5ede342c -docker-plugin:1.5 -docker-workflow:572.v950f58993843 -durable-task:547.vd1ea_007d100c -echarts-api:5.4.3-2 -email-ext:2.104 +docker-commons:443.v921729d5611d +docker-java-api:3.3.6-90.ve7c5c7535ddd +docker-plugin:1.6.2 +docker-workflow:580.vc0c340686b_54 +durable-task:568.v8fb_5c57e8417 +echarts-api:5.5.0-1 +email-ext:1814.v404722f34263 emailext-template:1.5 -embeddable-build-status:467.v4a_954796e45d +embeddable-build-status:487.va_0ef04c898a_2 envinject-api:1.199.v3ce31253ed13 -envinject:2.908.v66a_774b_31d93 -extended-choice-parameter:376.v2e02857547b_a_ +envinject:2.919.v009a_a_1067cd0 +extended-choice-parameter:382.v5697b_32134e8 extensible-choice-parameter:1.8.1 external-monitor-job:215.v2e88e894db_f8 -favorite:2.208.v91d65b_7792a_c +favorite:2.221.v19ca_666b_62f5 filesystem_scm:2.1 -font-awesome-api:6.5.1-2 -forensics-api:2.3.0 +font-awesome-api:6.5.2-1 +forensics-api:2.4.0 gatling:1.3.0 -git-changelog:3.37 -git-client:4.6.0 +git-changelog:3.38 +git-client:5.0.0 git-parameter:0.9.19 -git-server:114.v068a_c7cc2574 -git:5.2.1 -github-api:1.318-461.v7a_c09c9fa_d63 -github-branch-source:1772.va_69eda_d018d4 +git-server:126.v0d945d8d2b_39 +git:5.3.0 +github-api:1.321-468.v6a_9f5f2d5a_7e +github-branch-source:1793.v1831e9c68d77 github-oauth:597.ve0c3480fcb_d0 -github:1.38.0 -gitlab-api:5.3.0-91.v1f9a_fda_d654f -gitlab-branch-source:694.v1b_045877a_b_92 -gitlab-plugin:1.8.0 +github:1.39.0 +gitlab-api:5.6.0-97.v6603a_83f8690 +gitlab-branch-source:704.vc7f1202d7e14 +gitlab-plugin:1.8.1 golang:1.4 google-login:109.v022b_cf87b_e5b_ -gradle:2.9 +gradle:2.12 groovy-postbuild:228.vcdb_cf7265066 -h2-api:11.1.4.199-12.v9f4244395f7a_ +h2-api:11.1.4.199-30.v1c64e772f3a_c handlebars:3.0.8 handy-uri-templates-2-api:2.1.8-30.v7e777411b_148 -htmlpublisher:1.32 +htmlpublisher:1.36 http_request:1.18 image-tag-parameter:2.0 instance-identity:185.v303dc7c645f9 -ionicons-api:56.v1b_1c8c49374e -ivy:2.5 -jackson2-api:2.16.1-373.ve709c6871598 -jakarta-activation-api:2.0.1-3 -jakarta-mail-api:2.0.1-3 -javadoc:243.vb_b_503b_b_45537 -javax-activation-api:1.2.0-6 -javax-mail-api:1.6.2-9 +ionicons-api:74.v93d5eb_813d5f +ivy:2.6 +jackson2-api:2.17.0-379.v02de8ec9f64c +jakarta-activation-api:2.1.3-1 +jakarta-mail-api:2.1.3-1 +javadoc:280.v050b_5c849f69 +javax-activation-api:1.2.0-7 +javax-mail-api:1.6.2-10 jaxb:2.3.9-1 -jdk-tool:73.vddf737284550 -jenkins-design-language:1.27.10 -jersey2-api:2.41-133.va_03323b_a_1396 +jdk-tool:80.v8a_dee33ed6f0 +jenkins-design-language:1.27.14 +jersey2-api:2.44-151.v6df377fff741 jira-steps:2.0.165.v8846cf59f3db -jira:3.12 -jjwt-api:0.11.5-77.v646c772fddb_0 -jnr-posix-api:3.1.18-1 +jira:3.13 +jjwt-api:0.11.5-112.ve82dfb_224b_a_d +jnr-posix-api:3.1.19-2 job-dsl:1.87 jquery-detached:1.2.1 -jquery3-api:3.7.1-1 +jquery3-api:3.7.1-2 jquery:1.12.4-1 jsch:0.2.16-86.v42e010d9484b_ -junit:1259.v65ffcef24a_88 +junit:1284.vf75d778f98c5 kubernetes-cli:1.12.1 kubernetes-client-api:6.10.0-240.v57880ce8b_0b_2 -kubernetes-credentials:0.11 -kubernetes:4186.v1d804571d5d4 -ldap:711.vb_d1a_491714dc -lockable-resources:1232.v512d6c434eb_d -mailer:463.vedf8358e006b_ -mapdb-api:1.0.9-28.vf251ce40855d +kubernetes-credentials:174.va_36e093562d9 +kubernetes:4280.vd919fa_528c7e +ldap:725.v3cb_b_711b_1a_ef +lockable-resources:1255.vf48745da_35d0 +mailer:472.vf7c289a_4b_420 +mapdb-api:1.0.9-40.v58107308b_7a_7 mask-passwords:173.v6a_077a_291eb_5 -matrix-auth:3.2.1 -matrix-project:822.824.v14451b_c0fd42 +matrix-auth:3.2.2 +matrix-project:832.va_66e270d2946 maven-plugin:3.23 mercurial:1260.vdfb_723cdcc81 -metrics:4.2.21-449.v6960d7c54c69 -mina-sshd-api-common:2.12.0-90.v9f7fb_9fa_3d3b_ -mina-sshd-api-core:2.12.0-90.v9f7fb_9fa_3d3b_ +metrics:4.2.21-451.vd51df8df52ec +mina-sshd-api-common:2.13.1-117.v2f1a_b_66ff91d +mina-sshd-api-core:2.13.1-117.v2f1a_b_66ff91d momentjs:1.1.1 nodejs:1.6.1 -oic-auth:2.6 +oic-auth:4.303.v84089a_708ea_7 okhttp-api:4.11.0-172.vda_da_1feeb_c6e -p4:1.14.4 -pam-auth:1.10 -parallel-test-executor:418.v24f9a_141d726 -parameterized-trigger:787.v665fcf2a_830b_ -pipeline-aws:1.43 +p4:1.16.0 +pam-auth:1.11 +parallel-test-executor:473.v81c8f8d1675f +parameterized-trigger:806.vf6fff3e28c3e +pipeline-aws:1.45 pipeline-build-step:540.vb_e8849e1a_b_d8 -pipeline-graph-analysis:202.va_d268e64deb_3 -pipeline-groovy-lib:704.vc58b_8890a_384 -pipeline-input-step:477.v339683a_8d55e -pipeline-maven:1376.v18876d10ce9c -pipeline-milestone-step:111.v449306f708b_7 -pipeline-model-api:2.2175.v76a_fff0a_2618 -pipeline-model-definition:2.2175.v76a_fff0a_2618 -pipeline-model-extensions:2.2175.v76a_fff0a_2618 +pipeline-graph-analysis:216.vfd8b_ece330ca_ +pipeline-groovy-lib:727.ve832a_9244dfa_ +pipeline-input-step:495.ve9c153f6067b_ +pipeline-maven:1421.v610fa_b_e2d60e +pipeline-milestone-step:119.vdfdc43fc3b_9a_ +pipeline-model-api:2.2205.vc9522a_9d5711 +pipeline-model-definition:2.2205.vc9522a_9d5711 +pipeline-model-extensions:2.2205.vc9522a_9d5711 pipeline-rest-api:2.34 -pipeline-stage-step:305.ve96d0205c1c6 -pipeline-stage-tags-metadata:2.2175.v76a_fff0a_2618 +pipeline-stage-step:312.v8cd10304c27a_ +pipeline-stage-tags-metadata:2.2205.vc9522a_9d5711 pipeline-stage-view:2.34 -pipeline-utility-steps:2.16.1 -plain-credentials:143.v1b_df8b_d3b_e48 -plugin-util-api:3.8.0 +pipeline-utility-steps:2.17.0 +plain-credentials:183.va_de8f1dd5a_2b_ +plugin-util-api:4.1.0 popper-api:1.16.1-3 -popper2-api:2.11.6-4 -prism-api:1.29.0-10 -promoted-builds:945.v597f5c6a_d3fd +popper2-api:2.11.6-5 +prism-api:1.29.0-15 +promoted-builds:957.vf5b_cee587563 pubsub-light:1.18 -rebuild:330.v645b_7df10e2a_ +rebuild:332.va_1ee476d8f6d resource-disposer:0.23 run-condition:1.7 saml:4.464.vea_cb_75d7f5e0 sbt:81.vb_82499046630 -scm-api:683.vb_16722fb_b_80b_ -script-security:1321.va_73c0795b_923 -simple-theme-plugin:176.v39740c03a_a_f5 -slack:684.v833089650554 -snakeyaml-api:2.2-111.vc6598e30cc65 -sonar:2.17.1 -sse-gateway:1.26 -ssh-agent:346.vda_a_c4f2c8e50 -ssh-credentials:308.ve4497b_ccd8f4 -ssh-slaves:2.948.vb_8050d697fec -sshd:3.322.v159e91f6a_550 -stashNotifier:1.464.va_9203f84a_417 -structs:337.v1b_04ea_4df7c8 -subversion:2.17.3 -swarm:3.44 +scm-api:696.v778d637b_a_762 +script-security:1341.va_2819b_414686 +simple-theme-plugin:191.vcd207ef9dd24 +slack:734.v7f9ec8b_66975 +snakeyaml-api:2.2-121.v5a_68b_9300b_d4 +sonar:2.17.2 +sse-gateway:1.27 +ssh-agent:376.v8933585c69d3 +ssh-credentials:343.v884f71d78167 +ssh-slaves:2.973.v0fa_8c0dea_f9f +sshd:3.330.vc866a_8389b_58 +stashNotifier:1.507.vb_7300a_1a_a_d10 +structs:338.v848422169819 +subversion:1269.v53185011cd9f +swarm:3.46 throttle-concurrents:2.14 -timestamper:1.26 +timestamper:1.27 token-macro:400.v35420b_922dcb_ -trilead-api:2.133.vfb_8a_7b_9c5dd1 +trilead-api:2.147.vb_73cc728a_32e variant:60.v7290fc0eb_b_cd whitesource:21.1.2 windows-slaves:1.8.1 -workflow-aggregator:596.v8c21c963d92d -workflow-api:1291.v51fd2a_625da_7 -workflow-basic-steps:1042.ve7b_140c4a_e0c +workflow-aggregator:600.vb_57cdd26fdd7 +workflow-api:1322.v857eeeea_9902 +workflow-basic-steps:1058.vcb_fc1e3a_21a_9 workflow-cps-global-lib:612.v55f2f80781ef -workflow-cps:3853.vb_a_490d892963 -workflow-durable-task-step:1327.ve57634fb_09ce -workflow-job:1385.vb_58b_86ea_fff1 -workflow-multibranch:773.vc4fe1378f1d5 +workflow-cps:3922.va_f73b_7c4246b_ +workflow-durable-task-step:1364.v2fd76fb_6fd41 +workflow-job:1436.vfa_244484591f +workflow-multibranch:795.ve0cb_1f45ca_9a_ workflow-remote-loader:1.6 -workflow-scm-step:415.v434365564324 -workflow-step-api:657.v03b_e8115821b_ -workflow-support:865.v43e78cc44e0d -ws-cleanup:0.45 +workflow-scm-step:427.v4ca_6512e7df1 +workflow-step-api:678.v3ee58b_469476 +workflow-support:920.v59f71ce16f04 +ws-cleanup:0.46 xvfb:1.2 diff --git a/tests/config-deep-merge-tests.bats b/tests/config-deep-merge-tests.bats index 24486572..3806f8d1 100644 --- a/tests/config-deep-merge-tests.bats +++ b/tests/config-deep-merge-tests.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -load tests_helpers +load tests_helpers.bash COMPOSE_FILE=docker-compose-simple.yml @@ -12,7 +12,7 @@ function groovy_test(){ mkdir -p $TESTS_HOST_CONF_DIR/{dir1,dir2,dir3} create_docker_network - JENKINS_ENV_CONFIG_YML_URL="file://${TESTS_CONTAINER_CONF_DIR}/dir1,file://${TESTS_CONTAINER_CONF_DIR}/dir2,file://${TESTS_CONTAINER_CONF_DIR}/dir3/*.yml" \ + JENKINS_ENV_CONFIG_YML_URL="file://${TESTS_CONTAINER_CONF_DIR}/dir1/*.yml,file://${TESTS_CONTAINER_CONF_DIR}/dir2/*.yml,file://${TESTS_CONTAINER_CONF_DIR}/dir3/*.yml" \ docker_compose_up $COMPOSE_FILE health_check http://0.0.0.0:8080/login @@ -46,4 +46,4 @@ function groovy_test(){ docker_compose_down $COMPOSE_FILE rm -rf $TESTS_HOST_CONF_DIR destroy_docker_network -} \ No newline at end of file +} diff --git a/tests/docker-compose-consul.yml b/tests/docker-compose-consul.yml index b3d2e01f..12d0809f 100644 --- a/tests/docker-compose-consul.yml +++ b/tests/docker-compose-consul.yml @@ -1,4 +1,3 @@ -version: '2' services: consul: image: hashicorp/consul @@ -23,5 +22,5 @@ services: networks: default: - external: - name: ${JENKINS_DOCKER_NETWORK_NAME} \ No newline at end of file + name: ${JENKINS_DOCKER_NETWORK_NAME} + external: true diff --git a/tests/docker-compose-simple.yml b/tests/docker-compose-simple.yml index a0917fc8..4ff3ffcc 100644 --- a/tests/docker-compose-simple.yml +++ b/tests/docker-compose-simple.yml @@ -1,4 +1,3 @@ -version: '2' services: jenkins: image: odavid/my-bloody-jenkins @@ -24,5 +23,5 @@ services: networks: default: - external: - name: ${JENKINS_DOCKER_NETWORK_NAME} \ No newline at end of file + name: ${JENKINS_DOCKER_NETWORK_NAME} + external: true diff --git a/tests/groovy/config-handlers/CredsConfigTest.groovy b/tests/groovy/config-handlers/CredsConfigTest.groovy index 3d311020..7dd61efe 100644 --- a/tests/groovy/config-handlers/CredsConfigTest.groovy +++ b/tests/groovy/config-handlers/CredsConfigTest.groovy @@ -67,16 +67,6 @@ ssh-key-fileOnMaster: username: user passphrase: password1234 fileOnMaster: '/root/.ssh/id_rsa' -cert-cred: - type: cert - description: cert description - password: secret - base64: ${base64Text} -cert-cred-fileOnMaster: - type: cert - description: cert description - password: secret - fileOnMaster: '/root/xxx.crt' p4-pass-cred: type: p4-pass description: p4 pass description @@ -166,18 +156,6 @@ dynamic-p4-ticket-cred: assert it.passphrase.toString() == "password1234" assert it.privateKeySource.privateKeyFile == '/root/.ssh/id_rsa' } - assertCred("cert-cred", com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl){ - assert it.description == "cert description" - assert it.password.toString() == "secret" - assert it.keyStoreSource instanceof com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.UploadedKeyStoreSource - assert it.keyStoreSource.keyStoreBytes - } - assertCred("cert-cred-fileOnMaster", com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl){ - assert it.description == "cert description" - assert it.password.toString() == "secret" - assert it.keyStoreSource instanceof com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.FileOnMasterKeyStoreSource - assert it.keyStoreSource.keyStoreFile == '/root/xxx.crt' - } assertCred("p4-pass-cred", org.jenkinsci.plugins.p4.credentials.P4PasswordImpl){ assert it.description == "p4 pass description" assert it.password.toString() == "myp4pass" @@ -215,4 +193,4 @@ dynamic-p4-ticket-cred: assert it.ticketValue == 'myp4pass' } } -testCreds() \ No newline at end of file +testCreds() diff --git a/tests/groovy/config-handlers/SecurityConfigTest.groovy b/tests/groovy/config-handlers/SecurityConfigTest.groovy index 60383333..ffd49298 100644 --- a/tests/groovy/config-handlers/SecurityConfigTest.groovy +++ b/tests/groovy/config-handlers/SecurityConfigTest.groovy @@ -1,4 +1,5 @@ import org.yaml.snakeyaml.Yaml +import hudson.util.Secret handler = 'Security' configHandler = evaluate(new File("/usr/share/jenkins/config-handlers/${handler}Config.groovy")) @@ -83,7 +84,7 @@ realmConfig: def oicRealm = configHandler.setupOpenIDConnect(config) assert oicRealm instanceof org.jenkinsci.plugins.oic.OicSecurityRealm assert oicRealm.clientId == '111222333' - assert oicRealm.clientSecret.toString() == '33322211' + assert oicRealm.clientSecret.getPlainText().toString() == '33322211' assert oicRealm.wellKnownOpenIDConfigurationUrl == null // relevant only in auto assert oicRealm.tokenServerUrl == 'http://xxx2.yyy' assert oicRealm.authorizationServerUrl == 'http://xxx3.yyy' @@ -101,7 +102,8 @@ realmConfig: assert oicRealm.tokenFieldToCheckValue == 'value1' assert oicRealm.escapeHatchEnabled assert oicRealm.escapeHatchUsername == 'admin' - assert oicRealm.escapeHatchSecret.toString() == 'password' + //This is now a hashed password and not encrypted so can't be tested + //assert oicRealm.escapeHatchSecret.toString() == 'password' assert oicRealm.escapeHatchGroup == 'test1' } @@ -258,7 +260,7 @@ adminPassword: admin ) def realm = configHandler.setupJenkinsDatabase(config) assert (realm instanceof hudson.security.HudsonPrivateSecurityRealm) - assert hudson.model.User.all.size() == 1 + assert hudson.model.User.all.size() == 2 //SYSTEM is created by default } @@ -331,4 +333,4 @@ testJenkinsDatabaseUsers() testPlainTextMarkupFormatter() testSafeHtmlMarkupFormatter() testRawHtmlMarkupFormatter() -testRawHtmlMarkupFormatterWithDisableSyntaxHighlighting() \ No newline at end of file +testRawHtmlMarkupFormatterWithDisableSyntaxHighlighting() diff --git a/tests/groovy/deep-merge/AssertCredsFromDir1.groovy b/tests/groovy/deep-merge/AssertCredsFromDir1.groovy index 9254cd52..5bfd9a0a 100644 --- a/tests/groovy/deep-merge/AssertCredsFromDir1.groovy +++ b/tests/groovy/deep-merge/AssertCredsFromDir1.groovy @@ -9,4 +9,3 @@ def cred = currentCreds.find{it.id == 'git-user-pass'} assert cred assert cred.username == "username-dir1" assert cred.password.toString() == "password-dir1" - diff --git a/tests/tests_helpers.bash b/tests/tests_helpers.bash index 44aa3975..34d12686 100644 --- a/tests/tests_helpers.bash +++ b/tests/tests_helpers.bash @@ -29,19 +29,19 @@ function run_groovy_script(){ function docker_compose_up(){ file=$1 - docker-compose -f $TESTS_DIR/$file up -d + docker compose -f $TESTS_DIR/$file up -d } function docker_compose_down(){ file=$1 - docker-compose -f $TESTS_DIR/$file down -v --remove-orphans + docker compose -f $TESTS_DIR/$file down -v --remove-orphans } function docker_compose_exec(){ file=$1 service=$2 command="${@:3}" - docker-compose -f $TESTS_DIR/$file exec -T $service $command + docker compose -f $TESTS_DIR/$file exec -T $service $command } @@ -61,4 +61,4 @@ function create_docker_network(){ function destroy_docker_network(){ docker network rm $JENKINS_DOCKER_NETWORK_NAME -} \ No newline at end of file +}