Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
86860fd
initial commit
aramovic79 Jul 17, 2024
bd71a74
add launch.json with debugging configuration
aramovic79 Jul 17, 2024
57a894d
remove deprecated package ioutil
aramovic79 Jul 17, 2024
21f37fc
use deployment instead of pod
aramovic79 Jul 19, 2024
518d7ae
use deployment instead of pod to unsure resilience
aramovic79 Jul 19, 2024
72b529e
tmp changes
aramovic79 Jul 22, 2024
ce802a4
import of sample ord document
aramovic79 Jul 24, 2024
9d13288
fix warnings
aramovic79 Jul 24, 2024
6815b89
refactoring
aramovic79 Jul 25, 2024
5254f11
minor change
aramovic79 Jul 25, 2024
ec72dff
transform groups into resources
aramovic79 Jul 26, 2024
6b22427
set hasDocument to true
aramovic79 Jul 26, 2024
d07bb1f
add github actions file
aramovic79 Jul 26, 2024
8a96c04
minor changes
aramovic79 Jul 26, 2024
fe1b989
add .kube yaml files used for publish on OWS3
aramovic79 Jul 26, 2024
ae106c0
add make installation and run the tests
aramovic79 Jul 26, 2024
6ec1823
minor change
aramovic79 Jul 26, 2024
12590e8
Add print of current directory and print all the files in all directo…
aramovic79 Jul 26, 2024
da8b833
remove config files
aramovic79 Jul 26, 2024
e0732f4
add apiresourcedefinitions resource and reference if from resourcedef…
aramovic79 Aug 7, 2024
26a6f54
add resource content download
aramovic79 Aug 8, 2024
984e522
tmp change: skipped some tests
aramovic79 Aug 9, 2024
2d2ce73
add "-type f" to list all files recursively
aramovic79 Aug 9, 2024
f650012
minor change
aramovic79 Aug 9, 2024
dfebc95
minor change
aramovic79 Aug 9, 2024
0abf1a8
enable the github flow
aramovic79 Aug 9, 2024
cc23796
minor change
aramovic79 Aug 9, 2024
65c175d
enable tests
aramovic79 Aug 9, 2024
7fadaf7
minor change
aramovic79 Aug 9, 2024
a981dea
minor change
aramovic79 Aug 9, 2024
2b38185
add docker-image-build job
aramovic79 Aug 9, 2024
b07505e
minor change
aramovic79 Aug 9, 2024
95aa7bf
minor change
aramovic79 Aug 9, 2024
f328381
add login and push to internet facing artifactory
aramovic79 Aug 9, 2024
5efdd0f
add arficatory user, token and url used by github actions
aramovic79 Aug 9, 2024
2c0bd9b
minor change
aramovic79 Aug 9, 2024
efdc202
minor change
aramovic79 Aug 9, 2024
fc20ad5
minor change
aramovic79 Aug 9, 2024
4d5a807
minor change
aramovic79 Aug 9, 2024
e1b3e11
minor change
aramovic79 Aug 9, 2024
b5b144c
minor change
aramovic79 Aug 9, 2024
766679e
minor change
aramovic79 Aug 9, 2024
005300b
minor change
aramovic79 Aug 9, 2024
781fafb
minor change
aramovic79 Aug 9, 2024
2f98bb1
minor change
aramovic79 Aug 9, 2024
0f5185f
minor change
aramovic79 Aug 9, 2024
aa77f0f
minor change
aramovic79 Aug 9, 2024
f245bb5
minor change
aramovic79 Aug 9, 2024
cb84f5e
minor change
aramovic79 Aug 9, 2024
4296052
add docker image minor version increment logic
aramovic79 Aug 12, 2024
d934bb9
minor change
aramovic79 Aug 12, 2024
604acb9
minor change
aramovic79 Aug 12, 2024
15a1568
minor change
aramovic79 Aug 12, 2024
0136b8c
minor change
aramovic79 Aug 12, 2024
374e28c
minor change
aramovic79 Aug 12, 2024
5aaa4e9
version increment
aramovic79 Aug 12, 2024
2dd47db
add k8 make-target
aramovic79 Aug 12, 2024
c27369c
minor change
aramovic79 Aug 12, 2024
f3bf110
minor change
aramovic79 Aug 12, 2024
68ed2cc
minor change
aramovic79 Aug 12, 2024
00dde64
minor change
aramovic79 Aug 12, 2024
7444753
minor change
aramovic79 Aug 12, 2024
c0c4c69
minor change
aramovic79 Aug 12, 2024
138a303
minor change
aramovic79 Aug 12, 2024
5e8d228
minor change
aramovic79 Aug 12, 2024
6218bc9
minor change
aramovic79 Aug 12, 2024
865de69
minor change
aramovic79 Aug 12, 2024
37757bf
minor change
aramovic79 Aug 12, 2024
30bb05c
minor change
aramovic79 Aug 13, 2024
c4388a1
minor change
aramovic79 Aug 13, 2024
86fc3a9
minor change
aramovic79 Aug 13, 2024
393d8b1
minor change
aramovic79 Aug 13, 2024
a942082
minor change
aramovic79 Aug 13, 2024
9e41c7b
minor change
aramovic79 Aug 13, 2024
7eb465b
minor changes
aramovic79 Aug 13, 2024
53bb564
minor change
aramovic79 Aug 13, 2024
30d6fb6
minor change
aramovic79 Aug 13, 2024
494cbb5
minor change
aramovic79 Aug 13, 2024
5066896
minor change
aramovic79 Aug 13, 2024
140307a
minor change
aramovic79 Aug 13, 2024
a4baadb
minor changes
aramovic79 Aug 13, 2024
350ba29
minor changes
aramovic79 Aug 13, 2024
6a7971e
minor changes
aramovic79 Aug 13, 2024
39e1ce0
minor changes
aramovic79 Aug 13, 2024
3029ef9
minor changes
aramovic79 Aug 13, 2024
3de0962
minor changes
aramovic79 Aug 13, 2024
d42e671
minor change
aramovic79 Aug 13, 2024
e752501
minor change
aramovic79 Aug 13, 2024
d721268
minor change
aramovic79 Aug 13, 2024
fbd8d5b
minor change
aramovic79 Aug 13, 2024
96e3acd
minor change
aramovic79 Aug 13, 2024
e9d3a41
minor change
aramovic79 Aug 13, 2024
0e73df2
minor change
aramovic79 Aug 13, 2024
3d913f8
minor change
aramovic79 Aug 13, 2024
17e3f33
minor change
aramovic79 Aug 13, 2024
93980a3
minor change
aramovic79 Aug 13, 2024
69745be
minor change
aramovic79 Aug 13, 2024
ea66c53
minor change
aramovic79 Aug 13, 2024
cd90cb5
minor change
aramovic79 Aug 13, 2024
ece829f
minor change
aramovic79 Aug 13, 2024
6acc415
minor change
aramovic79 Aug 13, 2024
29102e0
minor change
aramovic79 Aug 13, 2024
be8b739
minor change
aramovic79 Aug 13, 2024
c3c27b0
minor change
aramovic79 Aug 13, 2024
3aa7226
minor change
aramovic79 Aug 13, 2024
2126fed
minor change
aramovic79 Aug 13, 2024
ab53270
minor change
aramovic79 Aug 13, 2024
93d2955
minor change
aramovic79 Aug 13, 2024
d3047d3
minor change
aramovic79 Aug 13, 2024
9260ccf
minor change
aramovic79 Aug 13, 2024
89fb736
minor change
aramovic79 Aug 13, 2024
ddd8e8d
minor change
aramovic79 Aug 13, 2024
201f012
minor change
aramovic79 Aug 13, 2024
6e32f7e
minor change
aramovic79 Aug 13, 2024
9028460
minor change
aramovic79 Aug 13, 2024
e9a6b30
minor change
aramovic79 Aug 13, 2024
1bb140f
minor change
aramovic79 Aug 13, 2024
aa56651
minor change
aramovic79 Aug 13, 2024
adad14d
minor change
aramovic79 Aug 13, 2024
396d11e
minor change
aramovic79 Aug 13, 2024
e27e2ee
minor change
aramovic79 Aug 13, 2024
2e46e57
minor change
aramovic79 Aug 13, 2024
11823bf
minor change
aramovic79 Aug 13, 2024
262e5c1
minor change
aramovic79 Aug 13, 2024
431ae5a
minor change
aramovic79 Aug 13, 2024
c27094d
minor change
aramovic79 Aug 13, 2024
efb80b6
minor change
aramovic79 Aug 14, 2024
6c573c7
minor change
aramovic79 Aug 14, 2024
c1e16bc
minor change
aramovic79 Aug 14, 2024
8fe4863
minor change
aramovic79 Aug 14, 2024
3a93e46
minor change
aramovic79 Aug 14, 2024
4e14d24
minor change
aramovic79 Aug 14, 2024
b1913f2
minor change
aramovic79 Aug 14, 2024
86a9cc7
minor change
aramovic79 Aug 15, 2024
cd52ce9
minor change
aramovic79 Aug 15, 2024
b0d4537
minor change
aramovic79 Aug 15, 2024
50ab736
minor change
aramovic79 Aug 15, 2024
ccdde4d
minor change
aramovic79 Aug 15, 2024
f5597d4
minor change
aramovic79 Aug 15, 2024
8db9cbb
minor change
aramovic79 Aug 15, 2024
7953694
minor change
aramovic79 Aug 15, 2024
89df3d0
minor change
aramovic79 Aug 15, 2024
177e21f
minor change
aramovic79 Aug 15, 2024
3055c07
minor change
aramovic79 Aug 15, 2024
f8133bc
minor change
aramovic79 Aug 15, 2024
c3ba4b9
minor change
aramovic79 Aug 15, 2024
69fb0de
minor change
aramovic79 Aug 15, 2024
c7f4bfc
minor change
aramovic79 Aug 15, 2024
cd778e7
minor change
aramovic79 Aug 15, 2024
36d1ec5
minor change
aramovic79 Aug 15, 2024
a332e96
minor change
aramovic79 Aug 15, 2024
ae796af
minor change
aramovic79 Aug 15, 2024
dbdceed
minor change
aramovic79 Aug 19, 2024
26bc75e
minor change
aramovic79 Aug 19, 2024
b11d3fc
minor change
aramovic79 Aug 19, 2024
f1a750f
minor change
aramovic79 Aug 19, 2024
474af12
minor change
aramovic79 Aug 19, 2024
aa5f759
minor change
aramovic79 Aug 19, 2024
38e8cc7
minor change
aramovic79 Aug 19, 2024
0faa566
minor change
aramovic79 Aug 19, 2024
9b6907e
minor change
aramovic79 Aug 19, 2024
6365a33
minor change
aramovic79 Aug 19, 2024
01a4a06
minor change
aramovic79 Aug 19, 2024
cdfd60d
minor change
aramovic79 Aug 19, 2024
4de0434
minor change
aramovic79 Aug 19, 2024
cae02a7
minor change
aramovic79 Aug 19, 2024
63073a4
minor change
aramovic79 Aug 19, 2024
74c5052
minor change
aramovic79 Aug 19, 2024
19858ec
minor change
aramovic79 Aug 19, 2024
539eac2
add pre-push event
aramovic79 Aug 19, 2024
46214b4
add pre-push event
aramovic79 Aug 19, 2024
cf0de6c
minor change
aramovic79 Aug 19, 2024
911405e
minor change
aramovic79 Aug 19, 2024
abb0f9e
minor change
aramovic79 Aug 19, 2024
7925d0b
minor change
aramovic79 Aug 19, 2024
8abac04
minor change
aramovic79 Aug 19, 2024
b7f26a9
minor change
aramovic79 Aug 19, 2024
e247f2a
minor change
aramovic79 Aug 19, 2024
d3eb2b6
minor change
aramovic79 Aug 19, 2024
339f542
minor change
aramovic79 Aug 19, 2024
22eef73
minor change
aramovic79 Aug 19, 2024
b47ffcf
minor change
aramovic79 Aug 21, 2024
f64e9c1
minor change
aramovic79 Aug 21, 2024
20f1732
minor change
aramovic79 Aug 21, 2024
4669682
minor change
aramovic79 Aug 21, 2024
7bf6f5c
minor change
aramovic79 Aug 21, 2024
82c1b16
minor change
aramovic79 Aug 21, 2024
0437bb5
minor change
aramovic79 Aug 21, 2024
5271cc7
minor change
aramovic79 Aug 21, 2024
e4a46e0
minor change
aramovic79 Aug 21, 2024
ad78a44
minor change
aramovic79 Aug 21, 2024
ccfc46d
minor change
aramovic79 Aug 21, 2024
ded834d
minor change
aramovic79 Aug 21, 2024
134ca21
minor change
aramovic79 Aug 21, 2024
b4c42b6
minor change
aramovic79 Aug 23, 2024
e8bccd1
minor change
aramovic79 Aug 23, 2024
09ae47b
minor change
aramovic79 Aug 23, 2024
7d7386d
minor change
aramovic79 Aug 23, 2024
1dd2b34
minor change
aramovic79 Aug 23, 2024
86e91ea
minor change
aramovic79 Aug 23, 2024
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
102 changes: 102 additions & 0 deletions .github/workflows/github-actions-apeiora-ows3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: GitHub Actions ApeiroRA OWS3
run-name: ${{ github.actor }} is testing out apeirora GitHub Actions
on: [push]
jobs:
ApeiroRA-OWS3-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job is running on a ${{ runner.os }} server and was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🔎 The name of the branch is ${{ github.ref }} and repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- name: Run tests using make
run: make tmptest
- name: Check and install make
run: |
if ! command -v make &> /dev/null
then
echo "make could not be found, installing..."
sudo apt-get update
sudo apt-get install -y make
else
echo "make is already installed"
fi

- name: Check and install kubectl
run: |
if ! command -v kubectl &> /dev/null
then
echo "kubectl could not be found, installing..."
curl -Lo kubectl https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
else
echo "kubectl is already installed"
fi

- name: Check and install uuidgen and then set GCTL_SESSION_ID
run: |
if ! command -v uuidgen &> /dev/null
then
echo "uuidgen could not be found, installing..."
sudo apt-get update
sudo apt-get install -y uuid-runtime
else
echo "uuidgen is already installed"
fi
echo "GCTL_SESSION_ID=$(uuidgen)" >> $GITHUB_ENV

- name: Check and install brew, gardenctl and kubelogin; publish afterwards
run: |
if ! command -v brew &> /dev/null
then
echo "brew could not be found, installing..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo 'export PATH="${BREW_ROOT:-$HOME/linuxbrew/.linuxbrew}/bin:$PATH"' >> $GITHUB_ENV
echo 'export PATH="${BREW_ROOT:-$HOME/linuxbrew/.linuxbrew}/sbin:$PATH"' >> $GITHUB_ENV
else
echo "brew is already installed"
fi

if ! command -v gardenctl &> /dev/null
then
echo "gardenctl could not be found, installing..."
brew install gardener/tap/gardenctl-v2
echo 'export PATH="${GARDENCTL_ROOT:-$HOME/linuxbrew/.linuxbrew}/bin/gardenctl:$PATH"' >> $GITHUB_ENV
else
echo "gardenctl is already installed"
fi

if ! command -v gardenlogin &> /dev/null
then
echo "gardenlogin could not be found, installing..."
brew install gardener/tap/gardenlogin
else
echo "gardenlogin is already installed"
fi

if ! command -v kubelogin &> /dev/null
then
echo "kubelogin could not be found, installing..."
brew install int128/kubelogin/kubelogin
else
echo "kubelogin is already installed"
fi

make k8
env:
GARDEN_OWS3_PATH: ${{ secrets.GARDEN_OWS3_PATH }}
K8_CLUSTER_PATH: ${{ secrets.K8_CLUSTER_PATH }}
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
JF_URL: ${{ secrets.JF_URL }}

# - name: Apply Kubernetes configuration
# run: |
# make k8-apply
# env:
# K8_CLUSTER_PATH: ${{ secrets.K8_CLUSTER_PATH }}
- run: echo "🍏 This job's status is ${{ job.status }}."
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.github
# .github
server
xr
.cmds
Expand Down
33 changes: 33 additions & 0 deletions .kube/kubeconfig-garden-ows3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
kind: Config
apiVersion: v1
clusters:
- name: garden-ows3
cluster:
server: https://api.canary.gardener.cloud.sap
timeouts:
request-timeout: "600s"
contexts:
- context:
cluster: garden-ows3
user: oidc-login
namespace: garden-ows3
name: garden-ows3
current-context: garden-ows3
users:
- name: oidc-login
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: kubectl
args:
- oidc-login
- get-token
- '--oidc-issuer-url=https://gardener-live.accounts.ondemand.com'
- '--oidc-client-id=9adf0114-225e-4dc8-a6e7-ad6556722825'
- '--oidc-extra-scope=email'
- '--oidc-extra-scope=profile'
- '--oidc-extra-scope=offline_access'
- '--oidc-use-pkce'
- '--grant-type=auto'
- '--skip-open-browser'
preferences: {}
74 changes: 74 additions & 0 deletions .kube/kubeconfig-gardenlogin--ows3--ytdzgvnl69.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: v1
kind: Config
current-context: garden-ows3--ytdzgvnl69-external
contexts:
- name: garden-ows3--ytdzgvnl69-external
context:
cluster: garden-ows3--ytdzgvnl69-external
user: garden-ows3--ytdzgvnl69
namespace: default
- name: garden-ows3--ytdzgvnl69-internal
context:
cluster: garden-ows3--ytdzgvnl69-internal
user: garden-ows3--ytdzgvnl69
namespace: default
clusters:
- name: garden-ows3--ytdzgvnl69-external
cluster:
server: https://api.ytdzgvnl69.ows3.shoot.canary.k8s-hana.ondemand.com
certificate-authority-data: >-
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUQ1akNDQWs2Z0F3SUJBZ0lRTndjNUFHSTFIZStJTmthY1RSYm5QVEFOQmdrcWhraUc5dzBCQVFzRkFEQU4KTVFzd0NRWURWUVFERXdKallUQWVGdzB5TkRBM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zAxUWMvQjQxOTZNbApiOC9EWVJlNDU0OEZQdTdpU1hIdTUvWUJSS3hBaDMvdE5BZW14S2NwYk8xdC8wSjYyK093dkRISlU4UW42NzFRCmwwczZMQ1BVa3RBdzJCVHVIcjUySU5VZWFrOEVZc0lYeXJicXNpR0lVTGRJeWVRK0hleUVhRHcyU0VCNTVidlEKVDVwZHNSVVQzTm1idjZwakY2YWloUU55dFZVYWRzRTZhbFpYWU9Ya3dmNVE5OEFhaTZEeDJnM0JsKzBlcCs1YgplQm9ESzdYSEVXZUdqN0pnQitjeWlFUU51Zm4rc3lVZG1iL1VZZjJXMzVsVW9RcjF1aFJHeWtodTBjVGtyVUoyClp2Mmhzd0pFNGhpeXVPQjBSYXQ3alNKcThYQ0huRVNrWUsvQ1BCRlBiSGhzekRoWUFKVGRNSERGTWlENVBGL2UKVGdhZTVJSXgxOVVlekVjVU5BWVlvMHF0REJLZXMxQlJqMnV0K0Mzc2tLY3V6RFVuY2hvaFNYbWJkbENyQTZaUQpiZ3RIL0x4MDYzMWpmNmdrUEc1bHJIQVJBcWdXdXFDRmVBWkM1RFhMai84R2JxSFluN1NoVnQ2VQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
timeoutSeconds: 600
extensions: &ref_0
- name: client.authentication.k8s.io/exec
extension:
shootRef:
namespace: garden-ows3
name: ytdzgvnl69
gardenClusterIdentity: sap-landscape-canary
- name: garden-ows3--ytdzgvnl69-internal
cluster:
server: https://api.ytdzgvnl69.ows3.internal.canary.k8s.ondemand.com
certificate-authority-data: >-
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUQ1akNDQWs2Z0F3SUJBZ0lRTndjNUFHSTFIZStJTmthY1RSYm5QVEFOQmdrcWhraUc5dzBCQVFzRkFEQU4KTVFzd0NRWURWUVFERXdKallUQWVGdzB5TkRBMU1qTXdPRFEyTURkYUZ3MHpOREExTWpNd09EUTJNRGRhTUEweApDekFKQmdOVkJBTVRBbU5oTUlJQm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8xdC8wSjYyK093dkRISlU4UW42NzFRCmwwczZMQ1BVa3RBdzJCVHVIcjUySU5VZWFrOEVZc0lYeXJicXNpR0lVTGRJeWVRK0hleUVhRHcyU0VCNTVidlEKVDVwZHNSVVQzTm1idjZwakY2YWloUU55dFZVYWRzRTZhbFpYWU9Ya3dmNVE5OEFhaTZEeDJnM0JsKzBlcCs1YgplQm9ESzdYSEVXZUdqN0pnQitjeWlFUU51Zm4rc3lVZG1iL1VZZjJXMzVsVW9RcjF1aFJHeWtodTBjVGtyVUoyClp2Mmhzd0pFNGhpeXVPQjBSYXQ3alNKcThYQ0huRVNrWUsvQ1BCRlBiSGhzekRoWUFKVGRNSERGTWlENVBGL2UKVGdhZTVJSXgxOVVlekVjVU5BWVlvMHF0REJLZXMxQlJqMnV0K0Mzc2tLY3V6RFVuY2hvaFNYbWJkbENyQTZaUQpiZ3RIL0x4MDYzMWpmNmdrUEc1bHJIQVJBcWdXdXFDRmVBWkM1RFhMai84R2JxSFluN1NoVnQ2VQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
extensions: *ref_0
users:
- name: garden-ows3--ytdzgvnl69
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: kubectl-gardenlogin
args:
- get-client-certificate
provideClusterInfo: true
interactiveMode: IfAvailable
installHint: >-
Follow the instructions on

- https://github.com/gardener/gardenlogin#installation to install and

- https://github.com/gardener/gardenlogin#configure-gardenlogin to
configure the gardenlogin credential plugin.


The following is a sample configuration for gardenlogin as well as
gardenctl. Place the file under ~/.garden/gardenctl-v2.yaml.


---

gardens:
- identity: sap-landscape-canary
kubeconfig: "<path-to-garden-cluster-kubeconfig>"
...


Alternatively, you can run the following gardenctl command:


$ gardenctl config set-garden sap-landscape-canary --kubeconfig
"<path-to-garden-cluster-kubeconfig>"


Note that the kubeconfig refers to the path of the garden cluster
kubeconfig which you can download from the Account page.
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Go: Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmds",
"env": {
"VERBOSE": "2",
"PORT": "8080"
}
}
]
}
78 changes: 66 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,69 @@ DBHOST ?= 127.0.0.1
DBPORT ?= 3306
DBUSER ?= root
DBPASSWORD ?= password
IMAGE ?= duglin/xreg-server
IMAGE ?= xreg-server
VERSION_FILE := version.txt
NAMESPACE := ingress-nginx
EMAIL := albin.ramovic@sap.com

# Get folders containing tests
TESTDIRS := $(shell find . -name *_test.go -exec dirname {} \; | sort -u)

# Read the current version from the file
CURRENT_VERSION := $(shell cat $(VERSION_FILE))

# Increment the (minor) version number
define increment_version
$(eval MAJOR := $(word 1,$(subst ., ,$(CURRENT_VERSION))))
$(eval MINOR := $(word 2,$(subst ., ,$(CURRENT_VERSION))))
$(eval PATCH := $(word 3,$(subst ., ,$(CURRENT_VERSION))))
$(eval NEW_MINOR := $(shell echo $$(($(MINOR) + 1))))
$(eval NEW_VERSION := $(MAJOR).$(NEW_MINOR).$(PATCH))
endef

ifdef XR_SPEC
# If pointing to local spec then make sure "docker run" uses it too
DOCKER_SPEC=/spec
endif

cmds: .cmds
.cmds: server xr
.cmds: server
@touch .cmds

qtest: .test

test: .test .testimage
tmptest:
@echo "# Testing: tmp change"
@go clean -testcache
@echo "go test -failfast ./registry"
@go test -failfast ./registry

test: .test
.test: export TESTING=1
.test: .cmds */*test.go
@make --no-print-directory mysql waitformysql
@echo
@echo "# Testing"
@go clean -testcache
@echo "go test -failfast $(TESTDIRS)"
@for s in $(TESTDIRS); do if ! go test -failfast $$s; then exit 1; fi; done
@# go test -failfast $(TESTDIRS)
@go test -failfast $(TESTDIRS)
@echo
@echo "# Run again w/o deleting the Registry after each one"
@go clean -testcache
NO_DELETE_REGISTRY=1 go test -failfast $(TESTDIRS)
@touch .test

unittest:
.unittest:
go test -failfast ./registry

server: cmds/server.go cmds/loader.go registry/*
@echo
@echo "# Building server"
go build $(BUILDFLAGS) -o $@ cmds/server.go cmds/loader.go

xr: cmds/xr*.go registry/*
xr: cmds/xr/xr*.go registry/*
@echo
@echo "# Building CLI"
go build $(BUILDFLAGS) -o $@ cmds/xr*.go
go build $(BUILDFLAGS) -o $@ cmds/xr/xr*.go

image: .image
.image: server misc/Dockerfile misc/waitformysql misc/Dockerfile-all \
Expand All @@ -63,9 +83,10 @@ ifdef XR_SPEC
@mkdir -p .spec
cp -r $(XR_SPEC)/* .spec
endif
@misc/errOutput docker build -f misc/Dockerfile -t $(IMAGE) --no-cache .
@misc/errOutput docker build --progress=plain -f misc/Dockerfile -t $(IMAGE) --no-cache .
@misc/errOutput docker build -f misc/Dockerfile-all -t $(IMAGE)-all \
--no-cache .
@echo "# Image $(IMAGE) successfully created"
ifdef XR_SPEC
@rm -rf .spec
endif
Expand All @@ -85,8 +106,23 @@ testimage: .testimage

push: .push
.push: .image
docker push $(IMAGE)
docker push $(IMAGE)-all
@echo "# Build and push Docker image"
@docker login --username=$(ARTIFACTORY_USER) --password=$(ARTIFACTORY_TOKEN) $(JF_URL)
@echo "Incrementing the version..."
@$(call increment_version)
@if [ -z "$(NEW_VERSION)" ]; then \
NEW_VERSION=latest; \
fi

@echo "Delete the latest tag because overwrite is not working in Artifactory"
@curl -X DELETE -u "$(ARTIFACTORY_USER):$(ARTIFACTORY_TOKEN)" "https://$(JF_URL)/v2/$(IMAGE)/manifests/latest"
@echo "Push the latest docker image"
@docker tag $(IMAGE) $(JF_URL)/$(IMAGE):latest
@docker push $(JF_URL)/$(IMAGE):latest
@echo "Push the $(NEW_VERSION) docker image"
@docker tag $(IMAGE) $(JF_URL)/$(IMAGE):$(NEW_VERSION)
@docker push $(JF_URL)/$(IMAGE):$(NEW_VERSION)
@echo $(NEW_VERSION) > $(VERSION_FILE)
@touch .push

notest run: mysql server local
Expand Down Expand Up @@ -138,6 +174,24 @@ mysql-client: mysql waitformysql
--protocol tcp || \
echo "If it failed, make sure mysql is ready"

k8: $(GARDEN_OWS3_PATH) $(K8_CLUSTER_PATH)
@$(MAKE) push
@gardenctl config set-garden sap-landscape-canary --kubeconfig "$(GARDEN_OWS3_PATH)"
# TODO: Solve this blocker "Please visit the following URL in your browser manually: http://localhost:8000"
# @kubectl --kubeconfig "$(K8_CLUSTER_PATH)" get namespaces
@export KUBECONFIG=$(K8_CLUSTER_PATH)
# @kubectl create secret docker-registry apeirora-ows3-secret \
# --docker-username=$(ARTIFACTORY_USER) \
# --docker-password=$(ARTIFACTORY_TOKEN) \
# --docker-email=$(EMAIL) \
# --docker-server=$(JF_URL) \
# --namespace=$(NAMESPACE)

k8-apply:
@echo "Delete $(IMAGE) service from the $(NAMESPACE) namespace first..."
@kubectl delete -f misc/deploy.yaml
@kubectl apply -f misc/deploy.yaml

k3d: misc/mysql.yaml
@k3d cluster list | grep xreg > /dev/null || \
(creating k3d cluster || \
Expand Down
Loading