diff --git a/.gitignore b/.gitignore index 0c9e7b5863..2da8c724bf 100755 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ server/www/locales/ *.swo buildargs.env deployment.env +docker.env vault.txt *.swo *.swp @@ -23,4 +24,4 @@ server/www/img/icons/ server/www/ app/locales/ package-lock.json -app/stats.html \ No newline at end of file +app/stats.html diff --git a/codeship-services.yml b/codeship-services.yml index 45692e6f46..c2eccbc809 100644 --- a/codeship-services.yml +++ b/codeship-services.yml @@ -53,3 +53,8 @@ test: - TEST_SUITE=unit cached: true default_cache_branch: develop + +dockercfggen: + image: codeship/dockercfg-generator + add_docker: true + encrypted_env_file: docker.env.encrypted diff --git a/codeship-steps.yml b/codeship-steps.yml index e8a1369bd0..c7ec674e69 100644 --- a/codeship-steps.yml +++ b/codeship-steps.yml @@ -14,8 +14,27 @@ service: release command: release tag: '^v[0-9]\.[0-9]+.[0-9]+([\-a-zA-Z0-9\.]+)?$' - - - name: "Deployment director" service: deploy command: CI_NAME=codeship ush-deployment-director.sh + +# Publish images to docker hub +- name: "Docker Hub upload" + type: parallel + steps: + - tag: master + name: "Upload latest tag" + service: dockerimg + type: push + image_name: ushahidi/platform-client + image_tag: latest + registry: https://index.docker.io/v1/ + dockercfg_service: dockercfggen + - tag: '^v(\d+\.)+\d+' + name: "Upload release tag" + service: dockerimg + type: push + image_name: ushahidi/platform-client + image_tag: "{{.Branch}}" + registry: https://index.docker.io/v1/ + dockercfg_service: dockercfggen \ No newline at end of file diff --git a/docker.env.encrypted b/docker.env.encrypted new file mode 100644 index 0000000000..0cb16d258e --- /dev/null +++ b/docker.env.encrypted @@ -0,0 +1,2 @@ +codeship:v2 +CB3n+FyxdRS8Za5VdpyiyNnyP9Io1Yj0NKWf6LDrN7/GOo/0ACbNhWjJvKCXTfFiR38XGXrxFGv85yg+FirQeXYjKRpZs8dReWAZKDXrzGl2UL4p82yUJSVDPKMwyEgVANVzrYi8uAAEEjzKv+ocRITTqp5JS2rjMIkb7KifzvMJgQsUO7iBcCiK3giyUF3QpmsSgB2nomwhf7JBDppzIC/xXF8A/g== \ No newline at end of file