Skip to content

Trigger the Akkeris UI tests in TaaS when a new release tag is pushed to Docker Hub

Notifications You must be signed in to change notification settings

octanner/ui-trigger-taas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UI Trigger for TaaS

Recieves Docker Hub webhooks for the Akkeris UI Docker repository and triggers TaaS tests.

Installation

  1. Set this code up somewhere nice (Akkeris perhaps...?)
  2. Follow the Create Webhooks documentation for Docker Hub and point a new webhook at the code
  3. ???
  4. Profit!

Environment

Variable Description Default
PORT Port to listen for webhooks on 9000
TAAS_URL URL of TaaS instance https://taas-maru.octanner.io
TAAS_TEST_NAME TaaS test name to trigger ui-tests-taas
AKKERIS_API_URL API URL for Akkeris to get app details https://controller-api.maru.octanner.io
AKKERIS_API_TOKEN Token for authenticating to Akkeris REQUIRED - e.g. Bearer abcdefg
UI_IMAGE_REPO UI Docker Hub repository name akkeris/ui
UI_IMAGE_TAG_PREFIX Tag prefix for release images release-

Bold environment variables are required

Notes

Sample Docker Hub Webhook payload (from Docker Hub documentation)

{
  "callback_url": "https://registry.hub.docker.com/u/svendowideit/testhook/hook/2141b5bi5i5b02bec211i4eeih0242eg11000a/",
  "push_data": {
    "images": [
        "27d47432a69bca5f2700e4dff7de0388ed65f9d3fb1ec645e2bc24c223dc1cc3",
        "51a9c7c1f8bb2fa19bcd09789a34e63f35abb80044bc10196e304f6634cc582c",
        "..."
    ],
    "pushed_at": 1.417566161e+09,
    "pusher": "trustedbuilder",
    "tag": "latest"
  },
  "repository": {
    "comment_count": 0,
    "date_created": 1.417494799e+09,
    "description": "",
    "dockerfile": "#\n# BUILD\u0009\u0009docker build -t svendowideit/apt-cacher .\n# RUN\u0009\u0009docker run -d -p 3142:3142 -name apt-cacher-run apt-cacher\n#\n# and then you can run containers with:\n# \u0009\u0009docker run -t -i -rm -e http_proxy http://192.168.1.2:3142/ debian bash\n#\nFROM\u0009\u0009ubuntu\n\n\nVOLUME\u0009\u0009[/var/cache/apt-cacher-ng]\nRUN\u0009\u0009apt-get update ; apt-get install -yq apt-cacher-ng\n\nEXPOSE \u0009\u00093142\nCMD\u0009\u0009chmod 777 /var/cache/apt-cacher-ng ; /etc/init.d/apt-cacher-ng start ; tail -f /var/log/apt-cacher-ng/*\n",
    "full_description": "Docker Hub based automated build from a GitHub repo",
    "is_official": false,
    "is_private": true,
    "is_trusted": true,
    "name": "testhook",
    "namespace": "svendowideit",
    "owner": "svendowideit",
    "repo_name": "svendowideit/testhook",
    "repo_url": "https://registry.hub.docker.com/u/svendowideit/testhook/",
    "star_count": 0,
    "status": "Active"
  }
}

Releases

No releases published

Packages

No packages published