Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
D
devtool
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards

git.psu.edu will be upgraded to critical security release 13.7.4 Monday, 11/18 between 9 and 10pm. Please email support@git.psu.edu if you have trouble with anything Gitlab-related. Please see the git.psu.edu Yammer group for more information.

  • k8s
  • devtool
  • Merge Requests
  • !10

Merged
Opened Mar 13, 2020 by Andy Cobaugh@atc135Owner

Add ci wait subcommand

  • Overview 5
  • Commits 9
  • Pipelines 6
  • Changes 4

This adds a ci wait subcommand, which will discover the version endpoint for a given project, and wait for it to update before exiting 0, or exit 1 if it exhausts the retries.

Example:

% CI_COMMIT_SHA=268de23asfasfd CI_PROJECT_NAME=psuid-service ./dist/devtool_linux_amd64/devtool ci wait -i foo -e develop                                                                                    
Error reading config file: Config File ".devtool" Not Found in "[/home/acobaugh]"
__________  _____________ ___      .___             __                .__
\______   \/   _____/    |   \   __| _/_______  ___/  |_  ____   ____ |  |
 |     ___/\_____  \|    |   /  / __ |/ __ \  \/ /\   __\/  _ \ /  _ \|  |
 |    |    /        \    |  /  / /_/ \  ___/\   /  |  | (  <_> |  <_> )  |__
 |____|   /_______  /______/   \____ |\___  >\_/   |__|  \____/ \____/|____/
                  \/                \/    \/
  • Waiting for new version to be available commit=268de23asfasfd env=develop project=psuid-service version=
  • Looking for version endpoint delay=10s maxtries=10
    • Checking URL: https://develop-psuid-service.qa.k8s.psu.edu/psuid-service-web/resources/version try=1
    • No version endpoint here  code=404
    • Checking URL: https://develop-psuid-service.qa.k8s.psu.edu/psuid-service/resources/version try=1
    • Found version endpoint    code=200
  • Waiting for version update delay=10s env=develop maxtries=30 project=psuid-service url=https://develop-psuid-service.qa.k8s.psu.edu/psuid-service/resources/version
    • Checking URL: https://develop-psuid-service.qa.k8s.psu.edu/psuid-service/resources/version try=1
    • Received response         code=200
    • New version is live

Usage:

Wait for a deployment to be deployed by watching the live version endpoint

Usage:
  devtool ci wait [flags]

Flags:
  -h, --help                    help for wait
      --timeout duration        Time to wait for every HTTP request (default 2s)
      --update-delay duration   Time to wait between checking version endpoint for update (default 10s)
      --update-max-tries int    Max tries to check version endpoint for the update (default 30)
      --url-delay duration      Time to wait between attempts to locate version endpoint (default 10s)
      --url-max-tries int       Max tries to locate the version endpoint (default 10)
  -u, --urls strings            List of URL templates to check in order to find version endpoint (default [https://{{.Env}}-{{.Project}}.qa.k8s.psu.edu/{{.Project}}-web/resources/version,https://{{.Env}}-{{.Project}}.qa.k8s.psu.edu/{{.Project}}/resources/version,https://{{.Env}}-{{.Project}}.qa.k8s.psu.edu/resources/version,https://{{.Env}}-{{.Project}}.qa.k8s.psu.edu/version])

Global Flags:
      --config string        config file (default is $HOME/.devtool.yaml)
  -e, --environment string   environment suffix to append to helm release name
  -i, --image-tag string     image tag for docker
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: k8s/devtool!10
Source branch: feature/ci_wait

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.