configure {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.cloudbees.plugins.credentials.CredentialsNameProvider | |
import com.cloudbees.plugins.credentials.Credentials | |
import com.cloudbees.plugins.credentials.CredentialsProvider | |
import com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials | |
import com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey | |
import org.jenkinsci.plugins.plaincredentials.StringCredentials | |
import org.jenkinsci.plugins.plaincredentials.FileCredentials | |
String checksum( String input ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.3-alpine | |
# This image is ready to build projects using technologies: | |
# - PHP7 (with Lumen) | |
# - Angular v8 | |
# Check stack details in: https://confluence.agile.corp.edp.pt/display/TNG/PHP7 | |
ENV COMPOSER_VERSION=1.9.3 \ | |
COMPOSER_CACHE_DIR=/tmp/.composer/cache \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p ssl | |
cat << EOF > ssl/req.cnf | |
[req] | |
req_extensions = v3_req | |
distinguished_name = req_distinguished_name | |
[req_distinguished_name] | |
[ v3_req ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p ssl | |
cat << EOF > ssl/req.cnf | |
[req] | |
req_extensions = v3_req | |
distinguished_name = req_distinguished_name | |
[req_distinguished_name] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey | |
import com.cloudbees.plugins.credentials.CredentialsScope | |
import com.cloudbees.plugins.credentials.SystemCredentialsProvider | |
import com.cloudbees.plugins.credentials.common.StandardCredentials | |
import com.cloudbees.plugins.credentials.domain.Domain | |
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl | |
import hudson.util.Secret | |
import org.apache.commons.fileupload.FileItem | |
import org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.cloudbees.plugins.credentials.*; | |
import com.cloudbees.plugins.credentials.domains.Domain; | |
import org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl; | |
def secret = '''Hi | |
there, | |
only | |
test''' | |
def secretBytes = SecretBytes.fromBytes(secret.getBytes()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want to forward a non-k8s-managed port and have permission to stand up a new pod, you can run the alpine/socat image and port-forward to that: | |
kubectl run --restart=Never --image=alpine/socat TEMP_POD_NAME -- -d -d tcp-listen:PORT,fork,reuseaddr tcp-connect:HOSTNAME:PORT | |
kubectl wait --for=condition=Ready pod/TEMP_POD_NAME | |
kubectl port-forward pod/TEMP_POD_NAME LOCAL_PORT:PORT | |
Don't forget to bring the pod down once you're done. | |
kubectl delete pod/TEMP_POD_NAME --grace-period 1 --wait=false |