Skip to content

Helm #31

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

Open
wants to merge 32 commits into
base: pre-helm
Choose a base branch
from
Open

Helm #31

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b574c62
feat: use helm to install cockroachdb, ingress-nginx & metallb into k…
FNSdev Aug 30, 2020
4983183
feat: add templates for jenkins
FNSdev Aug 30, 2020
16e44ea
feat: add jenkins-ingress
FNSdev Aug 31, 2020
fa83dfe
feat: update manifests
FNSdev Sep 2, 2020
75ae04e
feat: update values for jenkins chart
FNSdev Sep 5, 2020
4cf0d7b
feat: add helm chart for GITrello
FNSdev Sep 5, 2020
2e763a5
fix: correct include statement in _helpers.tpl
FNSdev Sep 5, 2020
08a68ca
fix: gitrello helm chart
FNSdev Sep 5, 2020
f1157c4
feat: add ingress configuration example in values.yaml
FNSdev Sep 5, 2020
9ec2410
feat: delete not needed manifests
FNSdev Sep 5, 2020
39441ba
feat: add Jenkinsfile
FNSdev Sep 5, 2020
6b7c39c
chore: remove hashes from requirements.txt
FNSdev Sep 5, 2020
6452f29
chore: update Jenkinsfile
FNSdev Sep 5, 2020
f84a5cb
chore: update Jenkinsfile #2
FNSdev Sep 5, 2020
9ef6292
chore: update Jenkinsfile (3)
FNSdev Sep 5, 2020
1d3599a
chore: add new stages to Jenkinsfile
FNSdev Sep 5, 2020
9b63a8a
chore: fix Jenkinsfile
FNSdev Sep 5, 2020
da93aef
chore: fix Jenkinsfile (2)
FNSdev Sep 5, 2020
a9e0eb5
feat: update settings
FNSdev Sep 5, 2020
160e5cf
fix: replace tmp with gitrello in templates
FNSdev Sep 6, 2020
370c87b
chore: add requests & limits to pods in Jenkinsfile
FNSdev Sep 6, 2020
02024ef
chore: update requests & limits to pods in Jenkinsfile
FNSdev Sep 6, 2020
d39d1de
feat: load gs_credentials from file
FNSdev Sep 6, 2020
44decd3
fix: Jenkinsfile
FNSdev Sep 6, 2020
05a5e18
fix: add --noinput to collectstatic in pipeline
FNSdev Sep 6, 2020
dcc7733
fix: add --noinput to test in pipeline
FNSdev Sep 6, 2020
2d6b1c1
fix: Jenkinsfile (2)
FNSdev Sep 6, 2020
cda5fec
fix: Jenkinsfile (3)
FNSdev Sep 6, 2020
2582af2
chore: bump app version
FNSdev Sep 6, 2020
8f907a5
chore: fix image in Jenkinsfile
FNSdev Sep 6, 2020
a1a8d8d
fix: try to load gs_credentials from file only if from_service_accoun…
FNSdev Sep 6, 2020
4694fd4
chore: add build status into README
FNSdev Sep 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions .github/workflows/deploy_on_push_tag.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/run_tests_on_push_to_develop.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,4 @@ GitHub.sublime-settings

# Credentials
gcs_creds.json
overrides.yaml
2 changes: 1 addition & 1 deletion deploy/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8.3-slim-buster AS base
FROM python:3.8.5-slim-buster AS base
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=off \
Expand Down
143 changes: 143 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
def tag

pipeline {
environment {
IMAGE_NAME = 'fnsdev/gitrello'
}
agent {
kubernetes {
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
name: ci
labels:
app: jenkins
spec:
nodeSelector:
type: ci
containers:
- name: python
image: python:3.8.5-slim-buster
command:
- cat
tty: true
resources:
requests:
memory: "400Mi"
cpu: "0.5"
limits:
memory: "400Mi"
cpu: "0.5"
- name: docker
image: docker:19.03
command:
- cat
tty: true
resources:
requests:
memory: "200Mi"
cpu: "0.2"
limits:
memory: "200Mi"
cpu: "0.2"
volumeMounts:
- name: dockersock
mountPath: /var/run/docker.sock
- name: helm
image: lachlanevenson/k8s-helm:v3.3.1
command:
- cat
tty: true
volumes:
- name: dockersock
hostPath:
path: /var/run/docker.sock
"""
}
}
stages {
stage ('Run tests') {
environment {
DJANGO_DB_NAME = credentials('test-db-name')
DJANGO_DB_USER = credentials('test-db-user')
DJANGO_DB_HOST = credentials('test-db-host')
DJANGO_DB_PORT = credentials('test-db-port')
DJANGO_DB_PASSWORD = credentials('test-db-password')
}
steps {
container('python') {
sh """
apt-get update && \
apt-get install --no-install-recommends -y libpq-dev git gcc libc6-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
"""
sh "pip install -r requirements.txt"
sh "cd gitrello && python manage.py test --noinput"
}
}
}
stage ('Set tag') {
steps {
script {
tag = sh(script: 'git describe', returnStdout: true).trim()
}
}
}
stage('Build image') {
steps {
container('docker') {
sh "docker build -t ${IMAGE_NAME}:${tag} ."
}
}
}
stage('Publish image') {
steps {
container('docker') {
withCredentials([usernamePassword(credentialsId: 'dockerhub', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh "echo ${PASSWORD} | docker login -u ${USERNAME} --password-stdin"
sh "docker push ${IMAGE_NAME}:${tag}"
}
}
}
}
stage('Migrate database') {
environment {
DJANGO_DB_NAME = credentials('db-name')
DJANGO_DB_USER = credentials('db-user')
DJANGO_DB_HOST = credentials('db-host')
DJANGO_DB_PORT = credentials('db-port')
DJANGO_DB_PASSWORD = credentials('db-password')
}
steps {
container('python') {
sh "cd gitrello && python manage.py migrate"
}
}
}
stage('Collect static') {
environment {
GS_BUCKET_NAME = credentials('gs-bucket-name')
GS_PROJECT_ID = credentials('gs-project-id')
}
steps {
container('python') {
withCredentials([file(credentialsId: 'gs-credentials', variable: 'GS_CREDENTIALS')]) {
sh "cd gitrello && python manage.py collectstatic --noinput --settings=gitrello.settings_prod"
}
}
}
}
stage('Deploy chart') {
steps {
container('helm') {
withCredentials([file(credentialsId: 'gitrello-overrides', variable: 'OVERRIDES')]) {
sh "helm upgrade gitrello --install ./manifests/gitrello -f ${OVERRIDES} --set deployment.image.tag=${tag}"
}
}
}
}
}
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# GITrello

[![Build Status](https://gitrello.me/jenkins/buildStatus/icon?job=gitrello)](https://gitrello.me/jenkins/job/gitrello/)
46 changes: 0 additions & 46 deletions deploy/deploy.py

This file was deleted.

Loading