From 04753df88c5b8d64a491953d684b679ff90a59fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96ystein=20Andersen?= Date: Wed, 25 Nov 2020 13:58:22 +0100 Subject: [PATCH] Added a way to copy from aws to docker hub --- pipeline/pipeline.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pipeline/pipeline.yaml b/pipeline/pipeline.yaml index 4e50bf9..5c3abf4 100644 --- a/pipeline/pipeline.yaml +++ b/pipeline/pipeline.yaml @@ -64,6 +64,19 @@ resources: admin_cert: ((demo_kube_admin_cert)) resource_type: cronjob resource_name: redis-clean-trigger + - name: pull_image + type: docker-image-resource + source: + repository: 935062023832.dkr.ecr.eu-west-1.amazonaws.com/redis_clean_trigger + aws_access_key_id: ((aws_access_key_ecr)) + aws_secret_access_key: ((aws_secret_key_ecr)) + - name: push_image + type: docker-image-resource + source: + repository: smartenergi/redis_clean_trigger + username: ((dockerhub_user)) + password: ((dockerhub_password)) + jobs: - name: "Build" @@ -150,3 +163,18 @@ jobs: *Build Pipeline Name*: $BUILD_PIPELINE_NAME *Job*: Deploy to demo *URL*: http://pipeline.smartenergi.io:8080/builds/$BUILD_ID + - name: Pull_and_push_2_hub + public: true + serial: false + plan: + - get: version + trigger: true + passed: ["Build"] + - get: pull_image + params: + save: true + - put: push_image + params: + load: pull_image + tag_file: version/number + get_params: { skip_download: true }