Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block AWS cronjob #803

Merged
merged 7 commits into from
Apr 24, 2018
Merged

block AWS cronjob #803

merged 7 commits into from
Apr 24, 2018

Conversation

bookshelfdave
Copy link
Contributor

No description provided.

@@ -0,0 +1,27 @@
FROM python:2-slim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried this with python 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was supposed to be python3! Great catch!

@bookshelfdave
Copy link
Contributor Author

updated to python 3, currently running in Oregon-A.

@bookshelfdave
Copy link
Contributor Author

bookshelfdave commented Apr 23, 2018

@@ -0,0 +1,5 @@
GIT_COMMIT_RAW=$(git rev-parse HEAD)
GIT_COMMIT=${GIT_COMMIT_RAW:0:7}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified to
GIT_COMMIT=$(git rev-parse --short HEAD)

GIT_COMMIT_RAW=$(git rev-parse HEAD)
GIT_COMMIT=${GIT_COMMIT_RAW:0:7}

docker build . -t quay.io/mozmar/blockaws:${GIT_COMMIT}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also eliminate the GIT_COMMIT definition above entirely and declare and assign a default on the first use:
docker build . -t quay.io/mozmar/blockaws:${GIT_COMMIT:=$(git rev-parse --short HEAD)}
This has the added benefit of allowing it to be overridden with an environment variable.

@bookshelfdave
Copy link
Contributor Author

TODO: add DMS + secret

Copy link
Contributor

@jgmize jgmize left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @metadave!

@jgmize jgmize merged commit 507f41e into master Apr 24, 2018
@jgmize jgmize deleted the dp_block_aws_cronjob branch April 24, 2018 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants