Docker login for aether registry in fabric-tna jobs
Change-Id: I32b6ad71bc6185ba7bb4f4cb2dd701f38cd73731
diff --git a/jjb/shell/docker-login.sh b/jjb/shell/docker-login.sh
index 2949dcb..41344c9 100644
--- a/jjb/shell/docker-login.sh
+++ b/jjb/shell/docker-login.sh
@@ -19,4 +19,14 @@
# exit on errors
set -eu -o pipefail
-docker login --username "${DOCKERHUB_USERNAME}" --password "${DOCKERHUB_PASSWORD}"
+if [ -n "${DOCKERHUB_USERNAME}" ]
+then
+ echo "Docker login: docker.io"
+ docker login --username "${DOCKERHUB_USERNAME}" --password "${DOCKERHUB_PASSWORD}"
+fi
+
+if [ -n "${AETHER_REGISTRY_USERNAME}" ]
+then
+ echo "Docker login: registry.aetherproject.org"
+ docker login registry.aetherproject.org --username "${AETHER_REGISTRY_USERNAME}" --password "${AETHER_REGISTRY_PASSWORD}"
+fi
diff --git a/jjb/templates/fabric-tna-jobs.yaml b/jjb/templates/fabric-tna-jobs.yaml
index 70203ef..5e625d8 100644
--- a/jjb/templates/fabric-tna-jobs.yaml
+++ b/jjb/templates/fabric-tna-jobs.yaml
@@ -50,6 +50,11 @@
credential-id: docker-artifact-push-credentials
username: DOCKERHUB_USERNAME
password: DOCKERHUB_PASSWORD
+ - credentials-binding:
+ - username-password-separated:
+ credential-id: aether-internal-registry
+ username: AETHER_REGISTRY_USERNAME
+ password: AETHER_REGISTRY_PASSWORD
builders:
- shell: !include-raw-escape: ../shell/docker-login.sh
@@ -111,6 +116,11 @@
credential-id: docker-artifact-push-credentials
username: DOCKERHUB_USERNAME
password: DOCKERHUB_PASSWORD
+ - credentials-binding:
+ - username-password-separated:
+ credential-id: aether-internal-registry
+ username: AETHER_REGISTRY_USERNAME
+ password: AETHER_REGISTRY_PASSWORD
builders:
- github-notifier