Skip to content

Commit 2e2e9e4

Browse files
author
Alan Christie
committed
- Initial fileset
1 parent 567fff3 commit 2e2e9e4

31 files changed

+1488
-1
lines changed

.ansible-lint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
3+
skip_list:
4+
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: build latest
3+
4+
# Actions on the main/master branch for every change.
5+
6+
# -----------------
7+
# Control variables (GitHub Secrets)
8+
# -----------------
9+
#
10+
# At the GitHub 'organisation' or 'project' level you must have the following
11+
# GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): -
12+
#
13+
# DOCKERHUB_USERNAME
14+
# DOCKERHUB_TOKEN
15+
#
16+
# -----------
17+
# Environment (GitHub Environments)
18+
# -----------
19+
#
20+
# Environment (n/a)
21+
22+
on:
23+
push:
24+
branches:
25+
- 'main'
26+
27+
jobs:
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
- name: Set up Python 3.9
34+
uses: actions/setup-python@v2
35+
with:
36+
python-version: 3.9
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install -r build-requirements.txt
41+
pip install -r requirements.txt
42+
ansible-galaxy install -r requirements.yaml
43+
- name: Lint
44+
run: |
45+
yamllint .
46+
find . -type f -name '*.yaml.j2' -exec yamllint {} +
47+
ansible-lint
48+
- name: Login to DockerHub
49+
uses: docker/login-action@v1
50+
with:
51+
username: ${{ secrets.DOCKERHUB_USERNAME }}
52+
password: ${{ secrets.DOCKERHUB_TOKEN }}
53+
- name: Build and push
54+
uses: docker/build-push-action@v2
55+
with:
56+
context: operator
57+
push: true
58+
tags: informaticsmatters/data-manager-jupyter-operator:latest
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: build stable
3+
4+
# Actions for an 'official' tag.
5+
#
6+
# An official tag is a 2 or 3-digit value (i.e. 'N.N[.N]').
7+
# We publish images using the tag as a tag and one using 'stable' as s tag.
8+
9+
# -----------------
10+
# Control variables (GitHub Secrets)
11+
# -----------------
12+
#
13+
# At the GitHub 'organisation' or 'project' level you must have the following
14+
# GitHub 'Secrets' defined (i.e. via 'Settings -> Secrets'): -
15+
#
16+
# DOCKERHUB_USERNAME
17+
# DOCKERHUB_TOKEN
18+
#
19+
# -----------
20+
# Environment (GitHub Environments)
21+
# -----------
22+
#
23+
# Environment (n/a)
24+
25+
on:
26+
push:
27+
tags:
28+
- '[0-9]+.[0-9]+.[0-9]+'
29+
- '[0-9]+.[0-9]+'
30+
31+
jobs:
32+
build:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
- name: Inject slug/short variables
38+
uses: rlespinasse/[email protected]
39+
- name: Login to DockerHub
40+
uses: docker/login-action@v1
41+
with:
42+
username: ${{ secrets.DOCKERHUB_USERNAME }}
43+
password: ${{ secrets.DOCKERHUB_TOKEN }}
44+
- name: Build and push
45+
uses: docker/build-push-action@v2
46+
with:
47+
context: operator
48+
push: true
49+
tags: |
50+
informaticsmatters/data-manager-jupyter-operator:${{ env.GITHUB_REF_SLUG }}
51+
informaticsmatters/data-manager-jupyter-operator:stable

.github/workflows/build-tag.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: build tag
3+
4+
# Actions for any 'unofficial' tag.
5+
#
6+
# It's not an official tag if it's not formed from 2 or 3 digits
7+
# (i.e. is not 'N.N[.N]'). We publish images using the tag as a tag.
8+
9+
# -----------------
10+
# Control variables (GitHub Secrets)
11+
# -----------------
12+
#
13+
# At the GitHub 'organisation' or 'project' level you must have the following
14+
# GitHub 'Secrets' defined (i.e. via 'Settings -> Secrets'): -
15+
#
16+
# DOCKERHUB_USERNAME
17+
# DOCKERHUB_TOKEN
18+
#
19+
# -----------
20+
# Environment (GitHub Environments)
21+
# -----------
22+
#
23+
# Environment (n/a)
24+
25+
on:
26+
push:
27+
tags:
28+
- '**'
29+
- '![0-9]+.[0-9]+.[0-9]+'
30+
- '![0-9]+.[0-9]+'
31+
32+
jobs:
33+
build:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
- name: Inject slug/short variables
39+
uses: rlespinasse/[email protected]
40+
- name: Login to DockerHub
41+
uses: docker/login-action@v1
42+
with:
43+
username: ${{ secrets.DOCKERHUB_USERNAME }}
44+
password: ${{ secrets.DOCKERHUB_TOKEN }}
45+
- name: Build and push
46+
uses: docker/build-push-action@v2
47+
with:
48+
context: operator
49+
push: true
50+
tags: informaticsmatters/data-manager-jupyter-operator:${{ env.GITHUB_REF_SLUG }}

.github/workflows/build.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: build
3+
4+
# Actions that take place on branches
5+
# or are driven by pull-requests to the main/master branch.
6+
# Here we build container images but don't push them
7+
# and therefore do not require docker credentials.
8+
9+
# -----------------
10+
# Control variables (GitHub Secrets)
11+
# -----------------
12+
#
13+
# (n/a)
14+
#
15+
# -----------
16+
# Environment (GitHub Environments)
17+
# -----------
18+
#
19+
# Environment (n/a)
20+
21+
on:
22+
push:
23+
branches-ignore:
24+
- 'main'
25+
pull_request:
26+
branches:
27+
- 'main'
28+
29+
jobs:
30+
build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v2
35+
- name: Set up Python 3.9
36+
uses: actions/setup-python@v2
37+
with:
38+
python-version: 3.9
39+
- name: Install dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install -r build-requirements.txt
43+
pip install -r requirements.txt
44+
ansible-galaxy install -r requirements.yaml
45+
- name: Lint
46+
run: |
47+
yamllint .
48+
find . -type f -name '*.yaml.j2' -exec yamllint {} +
49+
ansible-lint
50+
- name: Build
51+
uses: docker/build-push-action@v2
52+
with:
53+
context: operator

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
__pycache__
2+
.idea
3+
venv
4+
5+
production-parameters.yaml
6+
staging-parameters.yaml
7+
parameters.yaml
8+
9+
**/*.swp
10+
**/.DS_Store

.yamllint

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
yaml-files:
4+
- '*.yaml'
5+
- '*.yml'
6+
- '.yamllint'
7+
8+
ignore: |
9+
.github/
10+
roles/jupyter-operator/templates/deployment.yaml.j2
11+
12+
rules:
13+
indentation:
14+
spaces: 2
15+
indent-sequences: no
16+
trailing-spaces: {}
17+
truthy:
18+
allowed-values:
19+
- 'yes'
20+
- 'no'
21+
- 'true'
22+
- 'false'
23+
new-lines:
24+
type: unix
25+
new-line-at-end-of-file: enable
26+
key-duplicates: {}
27+
hyphens:
28+
max-spaces-after: 1
29+
empty-lines:
30+
max: 1
31+
document-start:
32+
present: yes
33+
document-end:
34+
present: no
35+
colons:
36+
max-spaces-before: 0
37+
max-spaces-after: 1
38+
commas:
39+
max-spaces-before: 0
40+
min-spaces-after: 1
41+
max-spaces-after: 1

0 commit comments

Comments
 (0)