Wednesday, July 17, 2019

Encrypt and decrypt file between openssl 1.0.1 and 1.1.1

Encryption is done on sun10 with OpenSSL 1.0.1p, Decryption is don on Linux with OpenSSL 1.1.1c 
Generate Random Pass File
$ openssl rand -base 32 > ~/.ssh/passfile
Deliver the pass file to the client which will decrypt the encrypted file, and change the permission to 400
$ chmod 400 passfile
Encrypt File
$ openssl enc -aes-256-cbc -pass file:encryption/passfile -salt -in test.txt -out test.txt.aes

Decrypt File
openssl enc -d -aes-256-cbc -pass file:encryption/passfile -in test.txt.aes -out test.txt -md md5

Tuesday, July 9, 2019

Match first occurrence

https://superuser.com/questions/266732/matching-only-the-first-occurrence-in-a-line-with-regex
^([^,]+),
That means
^        starts with
[^,]     anything but a comma
+        repeated one or more times (use * (means zero or more) if the first field can be empty)
([^,]+)  remember that part
,        followed by a comma

Wednesday, July 3, 2019

Plugins Used in Jenkins

ace-editor.jpi
active-directory.jpi
analysis-core.jpi
antisamy-markup-formatter.jpi
ant.jpi
apache-httpcomponents-client-4-api.jpi
authentication-tokens.jpi
bitbucket-build-status-notifier.jpi.tmp
bitbucket.jpi
bitbucket-pullrequest-builder.jpi.tmp
bouncycastle-api.jpi
branch-api.jpi
build-timeout.jpi
clearcase.jpi
cloudbees-bitbucket-branch-source.jpi
cloudbees-folder.jpi
command-launcher.jpi
conditional-buildstep.jpi
credentials-binding.jpi
credentials.jpi
dependency-check-jenkins-plugin.jpi
dependency-track.jpi
display-url-api.jpi
docker-commons.jpi
docker-workflow.jpi
durable-task.jpi
email-ext.jpi
external-monitor-job.jpi
flyway-runner.jpi
generic-webhook-trigger.jpi
git-client.jpi
github-api.jpi
github-branch-source.jpi
github.jpi
git.jpi
git-server.jpi
gradle.jpi
handlebars.jpi
handy-uri-templates-2-api.jpi
htmlpublisher.jpi
jackson2-api.jpi
javadoc.jpi
jdk-tool.jpi
job-dsl.jpi
jquery-detached.jpi
jquery.jpi
jquery-ui.jpi
jsch.jpi
junit.jpi
ldap.jpi
lockable-resources.jpi
mailer.jpi
mapdb-api.jpi
matrix-auth.jpi
matrix-project.jpi
maven-plugin.jpi
mercurial.jpi
momentjs.jpi
monitoring.jpi
multiple-scms.jpi.tmp
nexus-jenkins-plugin.jpi
pam-auth.jpi
parameterized-trigger.jpi
pipeline-build-step.jpi
pipeline-github-lib.jpi
pipeline-graph-analysis.jpi
pipeline-input-step.jpi
pipeline-milestone-step.jpi
pipeline-model-api.jpi
pipeline-model-declarative-agent.jpi
pipeline-model-definition.jpi
pipeline-model-extensions.jpi
pipeline-rest-api.jpi
pipeline-stage-step.jpi
pipeline-stage-tags-metadata.jpi
pipeline-stage-view.jpi
plain-credentials.jpi
postbuild-task.jpi
publish-over.jpi
publish-over-ssh.jpi
resource-disposer.jpi
role-strategy.jpi
run-condition.jpi
scm-api.jpi
script-security.jpi
sonar.jpi
ssh-credentials.jpi
ssh-slaves.jpi
stashNotifier.jpi
structs.jpi
subversion.jpi
text-finder.jpi
thucydides.jpi
timestamper.jpi
token-macro.jpi
windows-slaves.jpi
workflow-aggregator.jpi
workflow-api.jpi
workflow-basic-steps.jpi
workflow-cps-global-lib.jpi
workflow-cps.jpi
workflow-durable-task-step.jpi
workflow-job.jpi
workflow-multibranch.jpi
workflow-scm-step.jpi
workflow-step-api.jpi
workflow-support.jpi
ws-cleanup.jpi

Jenkins Startup with Parameters

# grep -v ^# /etc/sysconfig/jenkins
JENKINS_HOME="/var/lib/jenkins"


JENKINS_JAVA_CMD="/var/lib/jenkins/jre/bin/java"

JENKINS_USER="jenkins"


JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Djavax.net.ssl.trustStore=/var/lib/jenkins/.keystore/cacerts -Djavax.net.ssl.trustStorePassword=changeit"

JENKINS_PORT="8080"

JENKINS_LISTEN_ADDRESS=""

JENKINS_HTTPS_PORT=""

JENKINS_HTTPS_KEYSTORE=""

JENKINS_HTTPS_KEYSTORE_PASSWORD=""

JENKINS_HTTPS_LISTEN_ADDRESS=""


JENKINS_DEBUG_LEVEL="5"

JENKINS_ENABLE_ACCESS_LOG="no"

JENKINS_HANDLER_MAX="100"

JENKINS_HANDLER_IDLE="20"


JENKINS_ARGS="--httpsKeyStore=/var/lib/jenkins/jre/lib/security/castore --httpsKeyStorePassword=changeit "