Skip to content

Instantly share code, notes, and snippets.

@jcpowermac
Created June 27, 2017 17:11
Show Gist options
  • Select an option

  • Save jcpowermac/540aee866e87c78e9dbce0f85cf9a486 to your computer and use it in GitHub Desktop.

Select an option

Save jcpowermac/540aee866e87c78e9dbce0f85cf9a486 to your computer and use it in GitHub Desktop.
- name: Create and build test
gather_facts: False
hosts: localhost
connection: local
tasks:
- command: "oc new-project {{ item }}"
with_sequence: start=0 end=9 format=bs%02x
ignore_errors: True
- command: "oc -n {{ item }} new-build --name generic -D 'FROM centos\nRUN yum install wget -y'"
with_sequence: start=0 end=9 format=bs%02x
- command: "oc -n {{ item }} patch buildconfig generic -p '{\"spec\":{\"resources\": {\"requests\":{\"cpu\":\"1000m\",\"memory\":\"4Gi\"}}}}'"
with_sequence: start=0 end=9 format=bs%02x
- command: "oc -n {{ item }} cancel-build bc/generic"
with_sequence: start=0 end=9 format=bs%02x
- command: "oc -n {{ item }} start-build bc/generic"
with_sequence: start=0 end=9 format=bs%02x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment