Dashboard: Push Tekton dashboard image on merge to master

Created on 25 Apr 2019  路  6Comments  路  Source: tektoncd/dashboard

Now that we have https://github.com/tektoncd/dashboard/issues/13 in place (big shoutout to @vdemeester) for testing our code, we want to Docker build and push dashboard images: for example to gcr.io for anyone to pick up, test, experiment and use.

Important files to mention that I think will be of use: https://github.com/tektoncd/plumbing/blob/master/prow/config.yaml this denotes a "preSubmit" task that runs a script.

https://github.com/tektoncd/dashboard/blob/master/test/presubmit-tests.sh is how we currently run tests: this is said script for the "preSubmit" task.

If this was a Travis set up we would do the following, so we want to figure out how to do this with Prow.

script:
  # - BUILD IMAGE
  - export SHORT_COMMIT_ID=$(git rev-parse --short ${TRAVIS_COMMIT})
  - docker build -t ${IMAGE_NAME}:${SHORT_COMMIT_ID} -f Dockerfile .
  - docker build -t ${IMAGE_NAME}-test:${SHORT_COMMIT_ID} -f Dockerfile_test .
  # - TAG/PUSH IMAGE
  - if [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
      docker login -u ${SOME_FUNCTIONAL_ID} -p ${SOME_API_KEY} ${REPO_NAME} ;
      docker tag ${IMAGE_NAME}:${SHORT_COMMIT_ID} ${REPO_NAME}/${IMAGE_NAME}:${SHORT_COMMIT_ID} ;
      docker push ${REPO_NAME}/${IMAGE_NAME}:${SHORT_COMMIT_ID} ;
      docker tag ${IMAGE_NAME}:${SHORT_COMMIT_ID} ${REPO_NAME}/${IMAGE_NAME}:latest ;
      docker push ${REPO_NAME}/${IMAGE_NAME}:latest ;
    fi

Perhaps we add a "post submit" task that does the pushing?

Most helpful comment

Discussed this with @mnuttall, we agree it would be super cool to have a latest.yaml file now (e.g. as a GitHub release) that anyone can just pick up and use, and we document in our readme - that should all be under a new issue, so I'm going to close this.

/meow

All 6 comments

I'll work on this, I see postSubmits are a thing, so far nothing is getting built or pushed at https://github.com/tektoncd/plumbing currently.

@vdemeester this is something we certainly want to do for the dashboard and would be great to do for of the tektoncd repositories but beyond the scope of this. So I can work on this, how can I get access to the plumbing repository or how can I configure my fork of this repository to use a fork of the plumbing repository?

Raised in the #plumbing channel today, mentioned it'd be awesome to have this for pipeline too and maybe cli. Also discussed with @vdemeester a plan for next week to tackle this together.

One caveat is, I don't have an account on gcr.io and so I'm not sure whose account we'll use and whose would be billed! We've also got to be careful with access control (with Travis there's the notion of secret variables we'd use for authorisation)...

^^ Vincent tells me we could use the Prow service account 馃巶

/assign vdemeester

@bobcatfish FYI 馃憢

Adding potentially useful resources here as well

https://github.com/kubeflow/kubeflow/blob/master/prow_config.yaml#L200 here we see a postSubmit pushing to gcr.io

https://github.com/kubeflow/testing/commit/3a7e4ff5d910a4ecd8be2000cbdddfc8b9ca9b46 shows service account permission changes for the kubeflow project

We'll need to do at least 1) and possibly 2) for our https://github.com/tektoncd/plumbing/blob/master/prow/config.yaml.

@vdemeester has conquered this one and people can now pull from

gcr.io/tekton-nightly/dashboard:latest

We should get this documented somewhere next, thank you Vincent!

Discussed this with @mnuttall, we agree it would be super cool to have a latest.yaml file now (e.g. as a GitHub release) that anyone can just pick up and use, and we document in our readme - that should all be under a new issue, so I'm going to close this.

/meow

@a-roberts: cat image

In response to this:

Discussed this with @mnuttall, we agree it would be super cool to have a latest.yaml file now (e.g. as a GitHub release) that anyone can just pick up and use, and we document in our readme - that should all be under a new issue, so I'm going to close this.

/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Was this page helpful?
0 / 5 - 0 ratings