Skip to content

Commit

Permalink
feat: Upgrade all the things
Browse files Browse the repository at this point in the history
Upgraded all the plugins using the plugin script in the repo.

Upgraded Jenkins to the latest LTS.

Made changes to the config handlers for the plugin updates.

Made changes to the tests to ensure they run with latest actions
versions.

Moved over to the BATS provided GitHub Action for running BATS.
feat: Upgrade to latest gosu version.

Upgraded gosu to latest upstream.

Upgraded envconsul to latest upstream.
  • Loading branch information
lazzurs committed Aug 9, 2024
1 parent 0515e9a commit 1ffadf1
Show file tree
Hide file tree
Showing 13 changed files with 196 additions and 219 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
dist: [debian, alpine, jdk11]
steps:
- name: Setup BATS
uses: mig4/setup-bats@v1
uses: bats-core/bats[email protected]

- uses: actions/checkout@v2

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand Down Expand Up @@ -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 && \
Expand Down
2 changes: 1 addition & 1 deletion LTS_VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.426.3
2.462.1
5 changes: 2 additions & 3 deletions config-handlers/CloudsConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand Down Expand Up @@ -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() ?: ""
Expand Down
3 changes: 2 additions & 1 deletion config-handlers/CredsConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 1ffadf1

Please sign in to comment.