Skip to content

Commit

Permalink
change design to puzzle
Browse files Browse the repository at this point in the history
  • Loading branch information
chrira committed Jul 23, 2024
1 parent 8e125b0 commit dc18d5d
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 156 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@ jobs:
push: true
tags: |
quay.io/puzzle/dagger-techlab:pr-${{ github.event.pull_request.number }}
-
name: Build Puzzle Version
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
TRAINING_HUGO_ENV=puzzle
push: true
tags: |
quay.io/puzzle/dagger-techlab:pr-${{ github.event.pull_request.number }}-puzzle
-
name: 'Install Helm'
uses: azure/setup-helm@v4
Expand All @@ -76,7 +65,7 @@ jobs:
-
name: Create KUBECONFIG
env:
KUBE_CONFIG: '${{ secrets.KUBECONFIG_K8S_ACEND_TEST }}'
KUBE_CONFIG: '${{ secrets.KUBECONFIG_TEST_AV2 }}'
run: |
mkdir -p $HOME/.kube
echo "$KUBE_CONFIG" > $HOME/.kube/config
Expand All @@ -87,16 +76,24 @@ jobs:
TRAINING_NAMESPACE: 'pitc-cicd-dagger-techlab-test'
TRAINING_VERSION: '${{ github.sha }}'
run: |
helm upgrade $TRAINING_HELM_RELEASE acend-training-chart --install --wait --kubeconfig $HOME/.kube/config --namespace=$TRAINING_NAMESPACE --set=app.name=$HELM_RELEASE --set=app.version=$TRAINING_VERSION --repo=https://acend.github.io/helm-charts/ --values=helm-chart/values.yaml --atomic --history-max 1
helm upgrade $TRAINING_HELM_RELEASE acend-training-chart --install --wait \
--kubeconfig $HOME/.kube/config \
--namespace=$TRAINING_NAMESPACE \
--set=app.name=$HELM_RELEASE \
--set=app.version=$TRAINING_VERSION \
--repo=https://acend.github.io/helm-charts/ \
--values=helm-chart/values.yaml \
--atomic
-
name: Redeploy Deployments
env:
TRAINING_HELM_RELEASE: 'pr-${{ github.event.pull_request.number }}'
TRAINING_HELM_NAME: 'dagger-techlab-puzzle'
TRAINING_NAMESPACE: 'pitc-cicd-dagger-techlab-test'
run: |
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-acend --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-puzzle --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME} \
--kubeconfig $HOME/.kube/config \
--namespace $TRAINING_NAMESPACE
-
name: Comment PR Environments in PR
uses: marocchino/sticky-pull-request-comment@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
-
name: Create KUBECONFIG
env:
KUBE_CONFIG: '${{ secrets.KUBECONFIG_K8S_ACEND_TEST }}'
KUBE_CONFIG: '${{ secrets.KUBECONFIG_TEST_AV2 }}'
run: |
mkdir -p $HOME/.kube
echo "$KUBE_CONFIG" > $HOME/.kube/config
Expand All @@ -52,4 +52,4 @@ jobs:
QUAYIO_API_TOKEN: '${{ secrets.QUAYIO_API_TOKEN }}'
REPOSITORY: '${{ github.repository }}'
run: |
curl -X DELETE -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" https://quay.io/api/v1/repository/${REPOSITORY}/tag/pr-${PR_NUMBER}{,-puzzle}
curl -X DELETE -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" https://quay.io/api/v1/repository/${REPOSITORY}/tag/pr-${PR_NUMBER}
29 changes: 14 additions & 15 deletions .github/workflows/push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
push:
branches:
- main
- master

jobs:
build:
Expand Down Expand Up @@ -55,17 +54,6 @@ jobs:
push: true
tags: |
quay.io/puzzle/dagger-techlab:latest
-
name: Build Puzzle Version
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
TRAINING_HUGO_ENV=puzzle
push: true
tags: |
quay.io/puzzle/dagger-techlab:latest-puzzle
-
name: 'Install Helm'
uses: azure/setup-helm@v4
Expand All @@ -79,7 +67,7 @@ jobs:
-
name: Create KUBECONFIG
env:
KUBE_CONFIG: '${{ secrets.KUBECONFIG_K8S_ACEND }}'
KUBE_CONFIG: '${{ secrets.KUBECONFIG_PROD_AV2 }}'
run: |
mkdir -p $HOME/.kube
echo "$KUBE_CONFIG" > $HOME/.kube/config
Expand All @@ -90,12 +78,23 @@ jobs:
TRAINING_NAMESPACE: 'pitc-cicd-dagger-techlab-prod'
TRAINING_VERSION: '${{ github.sha }}'
run: |
helm upgrade $TRAINING_HELM_RELEASE acend-training-chart --install --wait --kubeconfig $HOME/.kube/config --namespace=$TRAINING_NAMESPACE --set=app.name=$HELM_RELEASE --set=app.version=$TRAINING_VERSION --repo=https://acend.github.io/helm-charts/ --values=helm-chart/values.yaml --atomic
helm upgrade $TRAINING_HELM_RELEASE acend-training-chart --install --wait \
--kubeconfig $HOME/.kube/config \
--namespace=$TRAINING_NAMESPACE \
--set=app.name=$HELM_RELEASE \
--set=app.version=$TRAINING_VERSION \
--repo=https://acend.github.io/helm-charts/ \
--values=helm-chart/values.yaml \
--set-string=acendTraining.deployments[0].ingress.labels.public=true \
--atomic
-
name: Redeploy Deployments
env:
TRAINING_HELM_RELEASE: 'latest'
TRAINING_HELM_NAME: 'dagger-techlab-puzzle'
TRAINING_NAMESPACE: 'pitc-cicd-dagger-techlab-prod'
run: |
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-puzzle --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME} \
--kubeconfig $HOME/.kube/config \
--namespace $TRAINING_NAMESPACE
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This is only rendered when `enabledModule` in `config.toml` **does not** contain
Build the image:

```bash
docker build [--build-arg TRAINING_HUGO_ENV=...] -t puzzle/dagger-techlab .
docker build -t puzzle/dagger-techlab .
```

Run it locally:
Expand Down
14 changes: 8 additions & 6 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ weight = 1

[[Languages.en.menu.main]]
weight = 10
name = "acend gmbh"
url = "https://www.acend.ch"
name = "Puzzle ITC GmbH"
url = "https://www.puzzle.ch"

[markup]
[markup.goldmark]
Expand All @@ -67,10 +67,12 @@ url = "https://www.acend.ch"
# guessSyntax = "true"

[params]
copyright = "acend gmbh"
copyright = "Puzzle ITC GmbH"
github_repo = "https://github.com/puzzle/dagger-techlab"
github_branch = "main"

imagePrefix = "puzzle_"

enabledModule = "base"

# Enable Lunr.js offline search
Expand Down Expand Up @@ -98,12 +100,12 @@ url = "https://github.com/puzzle/dagger-techlab"
[[params.links.user]]
name = "Twitter"
icon = "fab fa-twitter"
url = "https://twitter.com/acendch"
url = "https://twitter.com/puzzleitc"

[[params.links.user]]
name = "LinkedIn"
icon = "fab fa-linkedin-in"
url = "https://linkedin.com/company/acendch/"
url = "https://linkedin.com/company/puzzle-itc"


[module]
Expand All @@ -114,7 +116,7 @@ url = "https://linkedin.com/company/acendch/"
extended = true
min = "0.100.0"
[[module.imports]]
path = "github.com/acend/docsy-acend"
path = "github.com/puzzle/docsy-puzzle"
disable = false
[[module.imports]]
path = "github.com/acend/docsy-plus"
Expand Down
39 changes: 0 additions & 39 deletions config/variant1/config.toml

This file was deleted.

39 changes: 0 additions & 39 deletions config/variant12/config.toml

This file was deleted.

39 changes: 0 additions & 39 deletions config/variant2/config.toml

This file was deleted.

1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ github.com/google/docsy v0.4.0 h1:Eyt2aiDC1fnw/Qq/9xnIqUU5n5Yyk4c8gX3nBDdTv/4=
github.com/google/docsy v0.4.0/go.mod h1:vJjGkHNaw9bO42gpFTWwAUzHZWZEVlK46Kx7ikY5c7Y=
github.com/google/docsy v0.9.1 h1:+jqges1YCd+yHeuZ1BUvD8V8mEGVtPxULg5j/vaJ984=
github.com/google/docsy v0.9.1/go.mod h1:saOqKEUOn07Bc0orM/JdIF3VkOanHta9LU5Y53bwN2U=
github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg=
github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc=
github.com/google/docsy/dependencies v0.4.0 h1:FXwyjtuFfPIPBauU2t7uIAgS6VYfJf+OD5pzxGvkQsQ=
github.com/google/docsy/dependencies v0.4.0/go.mod h1:2zZxHF+2qvkyXhLZtsbnqMotxMukJXLaf8fAZER48oo=
Expand Down
3 changes: 3 additions & 0 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ acendTraining:
tag: ""
tagsuffix: ""
ingress:
annotations:
haproxy.router.openshift.io/hsts_header: max-age=31536000;includeSubDomains;preload
emptyTLS: true
ingressClassName: openshift-public
labels:
Expand All @@ -17,6 +19,7 @@ acendTraining:
appname: dagger-techlab
domainmain: puzzle.ch
domain: ocp.cloudscale.puzzle.ch

nameOverride: "dagger-techlab"
fullnameOverride: ""

Expand Down

0 comments on commit dc18d5d

Please sign in to comment.