DBZ-6216 Remove Docker credential
Remove docker credentials and login to docker hub from scripts and jobs. As this is in separate commit, it can be easily reverted in case we want to publish to docker hub again in the future.
This commit is contained in:
parent
f17721dc1e
commit
d38f9444c4
@ -19,9 +19,6 @@ freeStyleJob('release-debezium-nightly-image') {
|
||||
timeout {
|
||||
noActivity(600)
|
||||
}
|
||||
credentialsBinding {
|
||||
usernamePassword('DOCKER_USERNAME', 'DOCKER_PASSWORD', 'debezium-dockerhub')
|
||||
}
|
||||
credentialsBinding {
|
||||
string('QUAYIO_CREDENTIALS', 'debezium-quay')
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ TAG_REST_ENDPOINT = "https://api.github.com/repos/${params.DEBEZIUM_REPOSITORY}/
|
||||
STREAMS_TO_BUILD_COUNT = params.STREAMS_TO_BUILD_COUNT.toInteger()
|
||||
TAGS_PER_STREAM_COUNT = params.TAGS_PER_STREAM_COUNT.toInteger()
|
||||
GIT_CREDENTIALS_ID = 'debezium-github'
|
||||
DOCKER_CREDENTIALS_ID = 'debezium-dockerhub'
|
||||
QUAYIO_CREDENTIALS_ID = 'debezium-quay'
|
||||
|
||||
class Version implements Comparable {
|
||||
@ -154,11 +153,6 @@ node('Slave') {
|
||||
withCredentials([usernamePassword(credentialsId: GIT_CREDENTIALS_ID, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
|
||||
initVersions(GIT_USERNAME, GIT_PASSWORD)
|
||||
}
|
||||
withCredentials([usernamePassword(credentialsId: DOCKER_CREDENTIALS_ID, passwordVariable: 'DOCKER_PASSWORD', usernameVariable: 'DOCKER_USERNAME')]) {
|
||||
sh """
|
||||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
||||
"""
|
||||
}
|
||||
withCredentials([string(credentialsId: QUAYIO_CREDENTIALS_ID, variable: 'USERNAME_PASSWORD')]) {
|
||||
def credentials = USERNAME_PASSWORD.split(':')
|
||||
sh """
|
||||
|
@ -3,7 +3,6 @@ import java.util.*
|
||||
|
||||
IMAGES_DIR = 'images'
|
||||
GIT_CREDENTIALS_ID = 'debezium-github'
|
||||
DOCKER_CREDENTIALS_ID = 'debezium-dockerhub'
|
||||
QUAYIO_CREDENTIALS_ID = 'debezium-quay'
|
||||
|
||||
node('Slave') {
|
||||
@ -20,11 +19,6 @@ node('Slave') {
|
||||
userRemoteConfigs : [[url: "https://$params.IMAGES_REPOSITORY", credentialsId: GIT_CREDENTIALS_ID]]
|
||||
]
|
||||
)
|
||||
withCredentials([usernamePassword(credentialsId: DOCKER_CREDENTIALS_ID, passwordVariable: 'DOCKER_PASSWORD', usernameVariable: 'DOCKER_USERNAME')]) {
|
||||
sh """
|
||||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
||||
"""
|
||||
}
|
||||
withCredentials([string(credentialsId: QUAYIO_CREDENTIALS_ID, variable: 'USERNAME_PASSWORD')]) {
|
||||
def credentials = USERNAME_PASSWORD.split(':')
|
||||
sh """
|
||||
|
@ -5,7 +5,6 @@ DEBEZIUM_BRANCH=main
|
||||
|
||||
SNAPSHOT_VERSION=$(curl -s https://raw.githubusercontent.com/$DEBEZIUM_REPOSITORY/$DEBEZIUM_BRANCH/pom.xml | grep -o '<version>.*-SNAPSHOT</version>' | awk -F '[<>]' '{print $3}')
|
||||
|
||||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
||||
docker login -u ${QUAYIO_CREDENTIALS%:*} -p ${QUAYIO_CREDENTIALS#*:} quay.io
|
||||
docker build --build-arg DEBEZIUM_VERSION=$SNAPSHOT_VERSION -t quay.io/debezium/connect:nightly connect/snapshot
|
||||
docker push quay.io/debezium/connect:nightly
|
||||
|
Loading…
Reference in New Issue
Block a user