| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 1 | clean: |
| 2 | rm -rf tmp |
| 3 | rm -f server_* |
| 4 | rm -f pcloud |
| giolekva | 716efb9 | 2022-05-07 23:08:58 +0400 | [diff] [blame] | 5 | |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 6 | push_fluxcd_arm64: |
| 7 | docker build --file=Dockerfile.flux --tag=giolekva/flux:latest . --platform=linux/arm64 |
| giolekva | 716efb9 | 2022-05-07 23:08:58 +0400 | [diff] [blame] | 8 | docker push giolekva/flux:latest |
| giolekva | 9eacb1a | 2022-05-21 13:57:19 +0400 | [diff] [blame] | 9 | |
| Giorgi Lekveishvili | a1e7790 | 2023-11-06 14:48:27 +0400 | [diff] [blame] | 10 | build: export CGO_ENABLED=0 |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 11 | build: clean |
| Giorgi Lekveishvili | 46743d4 | 2023-12-10 15:47:23 +0400 | [diff] [blame] | 12 | /usr/local/go/bin/go build -o pcloud cmd/*.go |
| 13 | |
| 14 | test: export CGO_ENABLED=0 |
| 15 | test: |
| Giorgi Lekveishvili | 186eae5 | 2024-02-15 14:21:41 +0400 | [diff] [blame^] | 16 | /usr/local/go/bin/go test ./... |
| giolekva | 9eacb1a | 2022-05-21 13:57:19 +0400 | [diff] [blame] | 17 | |
| 18 | bootstrap: |
| Giorgi Lekveishvili | a1e7790 | 2023-11-06 14:48:27 +0400 | [diff] [blame] | 19 | ./pcloud --kubeconfig=../../priv/kubeconfig-hetzner bootstrap --env-name=dodo --charts-dir=../../charts --admin-pub-key=/Users/lekva/.ssh/id_rsa.pub --from-ip=192.168.100.210 --to-ip=192.168.100.240 --storage-dir=/pcloud-storage/longhorn |
| giolekva | 8aa73e8 | 2022-07-09 11:34:39 +0400 | [diff] [blame] | 20 | |
| 21 | create_env: |
| Giorgi Lekveishvili | 7fb28bf | 2023-06-24 19:51:16 +0400 | [diff] [blame] | 22 | ./pcloud --kubeconfig=../../priv/kubeconfig create-env --admin-priv-key=/Users/lekva/.ssh/id_rsa --name=lekva --ip=192.168.0.211 --admin-username=gio |
| giolekva | 8aa73e8 | 2022-07-09 11:34:39 +0400 | [diff] [blame] | 23 | |
| Giorgi Lekveishvili | 23ef7f8 | 2023-05-26 11:57:48 +0400 | [diff] [blame] | 24 | rpuppy: |
| Giorgi Lekveishvili | 7fb28bf | 2023-06-24 19:51:16 +0400 | [diff] [blame] | 25 | ./pcloud --kubeconfig=../../priv/kubeconfig install --ssh-key=/Users/lekva/.ssh/id_rsa --app=rpuppy --repo-addr=ssh://localhost:2222/lekva |
| Giorgi Lekveishvili | 7efe22f | 2023-05-30 13:01:53 +0400 | [diff] [blame] | 26 | |
| 27 | appmanager: |
| Giorgi Lekveishvili | ef21c13 | 2024-01-17 18:57:58 +0400 | [diff] [blame] | 28 | ./pcloud --kubeconfig=../../priv/kubeconfig appmanager --ssh-key=/Users/lekva/.ssh/id_ed25519 --repo-addr=ssh://localhost:2222/config --port=9090 --app-repo-addr=http://localhost:8080 |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 29 | |
| Giorgi Lekveishvili | 12850ee | 2023-06-22 13:11:17 +0400 | [diff] [blame] | 30 | welc: |
| Giorgi Lekveishvili | 46743d4 | 2023-12-10 15:47:23 +0400 | [diff] [blame] | 31 | ./pcloud --kubeconfig=../../priv/kubeconfig welcome --ssh-key=/Users/lekva/.ssh/id_rsa --repo-addr=ssh://192.168.0.210/config --port=9090 |
| 32 | |
| 33 | env: |
| 34 | ./pcloud --kubeconfig=../../priv/kubeconfig-hetzner envmanager --ssh-key=/Users/lekva/.ssh/id_rsa --repo-addr=192.168.100.210:22 --repo-name=config --port=9090 |
| Giorgi Lekveishvili | 12850ee | 2023-06-22 13:11:17 +0400 | [diff] [blame] | 35 | |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 36 | |
| 37 | |
| 38 | |
| 39 | ## installer image |
| 40 | build_arm64: export CGO_ENABLED=0 |
| 41 | build_arm64: export GO111MODULE=on |
| 42 | build_arm64: export GOOS=linux |
| 43 | build_arm64: export GOARCH=arm64 |
| 44 | build_arm64: |
| Giorgi Lekveishvili | 46743d4 | 2023-12-10 15:47:23 +0400 | [diff] [blame] | 45 | /usr/local/go/bin/go build -o server_arm64 cmd/*.go |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 46 | |
| Giorgi Lekveishvili | 94cda9d | 2023-07-20 10:16:09 +0400 | [diff] [blame] | 47 | build_amd64: export CGO_ENABLED=0 |
| 48 | build_amd64: export GO111MODULE=on |
| 49 | build_amd64: export GOOS=linux |
| 50 | build_amd64: export GOARCH=amd64 |
| 51 | build_amd64: |
| Giorgi Lekveishvili | 46743d4 | 2023-12-10 15:47:23 +0400 | [diff] [blame] | 52 | /usr/local/go/bin/go build -o server_amd64 cmd/*.go |
| Giorgi Lekveishvili | 94cda9d | 2023-07-20 10:16:09 +0400 | [diff] [blame] | 53 | |
| 54 | push_arm64: clean build_arm64 |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 55 | mkdir tmp |
| 56 | cp -r ../../charts tmp/ |
| Giorgi Lekveishvili | 94cda9d | 2023-07-20 10:16:09 +0400 | [diff] [blame] | 57 | podman build --platform linux/arm64 --tag=giolekva/pcloud-installer:arm64 . |
| Giorgi Lekveishvili | 0ccd148 | 2023-06-21 15:02:24 +0400 | [diff] [blame] | 58 | rm -rf tmp |
| Giorgi Lekveishvili | 94cda9d | 2023-07-20 10:16:09 +0400 | [diff] [blame] | 59 | podman push giolekva/pcloud-installer:arm64 |
| 60 | |
| 61 | push_amd64: clean build_amd64 |
| 62 | mkdir tmp |
| 63 | cp -r ../../charts tmp/ |
| 64 | podman build --platform linux/amd64 --tag=giolekva/pcloud-installer:amd64 . |
| 65 | rm -rf tmp |
| 66 | podman push giolekva/pcloud-installer:amd64 |
| 67 | |
| 68 | push: push_arm64 push_amd64 |
| 69 | podman manifest create giolekva/pcloud-installer:latest giolekva/pcloud-installer:arm64 giolekva/pcloud-installer:amd64 |
| 70 | podman manifest push giolekva/pcloud-installer:latest docker://docker.io/giolekva/pcloud-installer:latest |
| 71 | podman manifest rm giolekva/pcloud-installer:latest |