Skip to content

Instantly share code, notes, and snippets.

@res0nat0r
Last active March 11, 2019 04:09
Show Gist options
  • Select an option

  • Save res0nat0r/c5393c4b59c5fe7be08293eb626b0a88 to your computer and use it in GitHub Desktop.

Select an option

Save res0nat0r/c5393c4b59c5fe7be08293eb626b0a88 to your computer and use it in GitHub Desktop.
pipenv test for argo
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"]
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)
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
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
bottle = "*"
[requires]
python_version = "2.7"
{
"_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