Skip to content

Commit fe3b595

Browse files
authored
Remove docker login from Jenkin script (#3930)
* Remove docker login * remove docker login from Jenkinsfile.oke * Remove the docker login code * Remove ref to docker credential
1 parent 8a2c98e commit fe3b595

File tree

3 files changed

+0
-39
lines changed

3 files changed

+0
-39
lines changed

Jenkinsfile.oke

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ pipeline {
1717
environment {
1818
github_url = "${env.GIT_URL}"
1919
github_creds = 'ecnj_github'
20-
dockerhub_username_creds = 'docker-username'
21-
dockerhub_password_creds = 'docker-password'
2220
ocr_username_creds = 'OCR username'
2321
ocr_password_creds = 'OCR Password'
2422
ocir_registry_creds = 'ocir-server'
@@ -276,12 +274,7 @@ EOF
276274
}
277275

278276
stage('Build WebLogic Kubernetes Operator') {
279-
environment {
280-
DOCKERHUB_USERNAME = credentials("${dockerhub_username_creds}")
281-
DOCKERHUB_PASSWORD = credentials("${dockerhub_password_creds}")
282-
}
283277
steps {
284-
sh 'echo ${DOCKERHUB_PASSWORD} | docker login -u ${DOCKERHUB_USERNAME} --password-stdin'
285278
sh "mvn -DtrimStackTrace=false clean install"
286279
}
287280
}
@@ -438,8 +431,6 @@ EOF
438431
TEST_IMAGES_REPO_USERNAME = credentials("${ocir_username_creds}")
439432
TEST_IMAGES_REPO_PASSWORD = credentials("${ocir_password_creds}")
440433
TEST_IMAGES_REPO_EMAIL = credentials("${ocir_email_creds}")
441-
DOCKER_USERNAME = credentials("${dockerhub_username_creds}")
442-
DOCKER_PASSWORD = credentials("${dockerhub_password_creds}")
443434
compartment_ocid = credentials("${weblogick8s_qa_compartment_ocid}")
444435
DOMAIN_IMAGES_REPO = "phx.ocir.io"
445436
BASE_IMAGES_REPO = "phx.ocir.io"

jenkinsScript.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,6 @@ function checkJavaVersion {
4949
exit 1
5050
fi
5151
}
52-
function repoLogin {
53-
echo "Info: about to do ${WLSIMG_BUILDER:-docker} login"
54-
if [ ! -z ${DOCKER_USERNAME+x} ] && [ ! -z ${DOCKER_PASSWORD+x} ]; then
55-
out=$(echo $DOCKER_PASSWORD | ${WLSIMG_BUILDER:-docker} login -u $DOCKER_USERNAME --password-stdin)
56-
res=$?
57-
if [ $res -ne 0 ]; then
58-
echo "${WLSIMG_BUILDER:-docker} login failed"
59-
exit 1
60-
fi
61-
else
62-
echo "Info: Credentials DOCKER_USERNAME and DOCKER_PASSWORD are not set."
63-
fi
64-
}
6552

6653
# Record start time in a format appropriate for journalctl --since
6754
start_time=$(date +"%Y-%m-%d %H:%M:%S")
@@ -125,8 +112,6 @@ ulimit -a
125112
echo "Info: hard limits"
126113
ulimit -aH
127114

128-
repoLogin
129-
130115
mkdir $WORKSPACE/jdk
131116
cd $WORKSPACE/jdk
132117
wget https://download.oracle.com/java/17/archive/jdk-17.0.5_linux-x64_bin.tar.gz

okdtest.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,6 @@ usage() {
3232
exit $1
3333
}
3434

35-
repoLogin() {
36-
echo "Info: about to do ${WLSIMG_BUILDER:-docker} login"
37-
if [ ! -z ${DOCKER_USERNAME+x} ] && [ ! -z ${DOCKER_PASSWORD+x} ]; then
38-
out=$(echo $DOCKER_PASSWORD | ${WLSIMG_BUILDER:-docker} login -u $DOCKER_USERNAME --password-stdin)
39-
res=$?
40-
if [ $res -ne 0 ]; then
41-
echo "${WLSIMG_BUILDER:-docker} login failed"
42-
exit 1
43-
fi
44-
else
45-
echo "Info: Image repo credentials DOCKER_USERNAME and DOCKER_PASSWORD are not set."
46-
fi
47-
}
48-
4935
k8s_version="1.21"
5036

5137
KUBERNETES_CLI=${KUBERNETES_CLI:-kubectl}
@@ -150,7 +136,6 @@ ${KUBERNETES_CLI} get clusterrolebindings --no-headers | awk '/traefik-/{print $
150136

151137
sudo rm -rf ${PV_ROOT}/*
152138

153-
repoLogin
154139
export OKD=true
155140

156141
echo "${WLSIMG_BUILDER:-docker} info"

0 commit comments

Comments
 (0)