Last active
March 11, 2019 04:09
-
-
Save res0nat0r/c5393c4b59c5fe7be08293eb626b0a88 to your computer and use it in GitHub Desktop.
pipenv test for argo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM python:2.7.15 | |
| COPY main.py /app/main.py | |
| RUN pip install pipenv | |
| RUN pipenv install --system --deploy | |
| EXPOSE 8080 | |
| WORKDIR /app | |
| CMD [ "python", "main.py"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from bottle import route, run, template | |
| @route('/list_environments/<pipeline>/<env>') | |
| def list_environments(pipeline, env): | |
| return template("PIPELINE: {{pipeline}}\nENV: {{env}}", pipeline=pipeline, env=env) | |
| @route('/cowsay/<cow>') | |
| def cowsay(cow): | |
| return(cow) | |
| run(host='0.0.0.0', port=8080) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: batch/v1 | |
| kind: Job | |
| metadata: | |
| name: bottle | |
| spec: | |
| template: | |
| spec: | |
| restartPolicy: Never | |
| initContainers: | |
| - name: provisioner | |
| image: alpine/git | |
| args: | |
| - clone | |
| - https://gist.github.com/res0nat0r/c5393c4b59c5fe7be08293eb626b0a88 | |
| - /makisu-context | |
| volumeMounts: | |
| - name: context | |
| mountPath: /makisu-context | |
| containers: | |
| - name: makisu | |
| image: gcr.io/makisu-project/makisu:v0.1.8 | |
| imagePullPolicy: IfNotPresent | |
| args: | |
| - build | |
| - --push=gcr.io | |
| - --modifyfs=true | |
| - -t=<PROJECT>/bottle | |
| - --registry-config=/registry-config/registry.yaml | |
| - /makisu-context | |
| volumeMounts: | |
| - name: context | |
| mountPath: /makisu-context | |
| - name: registry-config | |
| mountPath: /registry-config | |
| volumes: | |
| - name: context | |
| emptyDir: {} | |
| - name: registry-config | |
| secret: | |
| secretName: docker-registry-config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [[source]] | |
| name = "pypi" | |
| url = "https://pypi.org/simple" | |
| verify_ssl = true | |
| [dev-packages] | |
| [packages] | |
| bottle = "*" | |
| [requires] | |
| python_version = "2.7" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_meta": { | |
| "hash": { | |
| "sha256": "7a67bf382b8afd347bc6e46a6e1cda5b548acae81cecda879377cf016fc67cc3" | |
| }, | |
| "pipfile-spec": 6, | |
| "requires": { | |
| "python_version": "2.7" | |
| }, | |
| "sources": [ | |
| { | |
| "name": "pypi", | |
| "url": "https://pypi.org/simple", | |
| "verify_ssl": true | |
| } | |
| ] | |
| }, | |
| "default": { | |
| "bottle": { | |
| "hashes": [ | |
| "sha256:9c310da61e7df2b6ac257d8a90811899ccb3a9743e77e947101072a2e3186726", | |
| "sha256:ca43beafbdccabbe31b758a4f34d1e44985a9b9539516775208b2b0f903eafa0" | |
| ], | |
| "index": "pypi", | |
| "version": "==0.12.16" | |
| } | |
| }, | |
| "develop": {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment