@vaharoni/devops 1.2.17 → 1.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/target-templates/infra-variants/digitalocean/.github/workflows/k8s-build.yaml +14 -4
- package/dist/src/target-templates/infra-variants/gcloud/.github/workflows/k8s-build.yaml +18 -4
- package/dist/src/target-templates/infra-variants/hetzner/.github/workflows/k8s-build.yaml +12 -4
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/{connect-to-digital-ocean@v1 → k8s/connect-to-digitalocean-k8s@v1}/action.yaml +4 -8
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/{connect-to-gke@v1 → k8s/connect-to-gke@v1}/action.yaml +5 -9
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/k8s/connect-to-hetzner-k8s@v1/action.yaml +19 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/registry/connect-to-artifact-registry@v1/action.yaml +29 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/registry/connect-to-docr@v1/action.yaml +17 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/registry/connect-to-harbor@v1/action.yaml +24 -0
- package/package.json +1 -1
- package/src/target-templates/infra-variants/digitalocean/.github/workflows/k8s-build.yaml +14 -4
- package/src/target-templates/infra-variants/gcloud/.github/workflows/k8s-build.yaml +18 -4
- package/src/target-templates/infra-variants/hetzner/.github/workflows/k8s-build.yaml +12 -4
- package/src/target-templates/lang-variants-common/typescript/.github/actions/{connect-to-digital-ocean@v1 → k8s/connect-to-digitalocean-k8s@v1}/action.yaml +4 -8
- package/src/target-templates/lang-variants-common/typescript/.github/actions/{connect-to-gke@v1 → k8s/connect-to-gke@v1}/action.yaml +5 -9
- package/src/target-templates/lang-variants-common/typescript/.github/actions/k8s/connect-to-hetzner-k8s@v1/action.yaml +19 -0
- package/src/target-templates/lang-variants-common/typescript/.github/actions/registry/connect-to-artifact-registry@v1/action.yaml +29 -0
- package/src/target-templates/lang-variants-common/typescript/.github/actions/registry/connect-to-docr@v1/action.yaml +17 -0
- package/src/target-templates/lang-variants-common/typescript/.github/actions/registry/connect-to-harbor@v1/action.yaml +24 -0
- package/dist/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-hetzner@v1/action.yaml +0 -31
- package/src/target-templates/lang-variants-common/typescript/.github/actions/connect-to-hetzner@v1/action.yaml +0 -31
package/dist/src/target-templates/infra-variants/digitalocean/.github/workflows/k8s-build.yaml
CHANGED
|
@@ -31,12 +31,17 @@ jobs:
|
|
|
31
31
|
- name: Setup prerequesites
|
|
32
32
|
uses: ./.github/actions/setup-prereq@v1
|
|
33
33
|
|
|
34
|
-
- name: Connect to
|
|
35
|
-
uses: ./.github/actions/connect-to-
|
|
34
|
+
- name: Connect to DigitalOcean K8s
|
|
35
|
+
uses: ./.github/actions/k8s/connect-to-digitalocean-k8s@v1
|
|
36
36
|
with:
|
|
37
37
|
access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
38
38
|
cluster_name: ${{ secrets.DIGITALOCEAN_CLUSTER_NAME }}
|
|
39
39
|
|
|
40
|
+
- name: Connect to DOCR
|
|
41
|
+
uses: ./.github/actions/registry/connect-to-docr@v1
|
|
42
|
+
with:
|
|
43
|
+
access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
44
|
+
|
|
40
45
|
# For deploying images to Cloud Run
|
|
41
46
|
# - name: Connect to Cloud Run
|
|
42
47
|
# uses: ./.github/actions/connect-to-cloud-run@v1
|
|
@@ -64,12 +69,17 @@ jobs:
|
|
|
64
69
|
- name: Setup prerequesites
|
|
65
70
|
uses: ./.github/actions/setup-prereq@v1
|
|
66
71
|
|
|
67
|
-
- name: Connect to
|
|
68
|
-
uses: ./.github/actions/connect-to-
|
|
72
|
+
- name: Connect to DigitalOcean K8s
|
|
73
|
+
uses: ./.github/actions/k8s/connect-to-digitalocean-k8s@v1
|
|
69
74
|
with:
|
|
70
75
|
access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
71
76
|
cluster_name: ${{ secrets.DIGITALOCEAN_CLUSTER_NAME }}
|
|
72
77
|
|
|
78
|
+
- name: Connect to DOCR
|
|
79
|
+
uses: ./.github/actions/registry/connect-to-docr@v1
|
|
80
|
+
with:
|
|
81
|
+
access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
82
|
+
|
|
73
83
|
# For deploying images to Cloud Run
|
|
74
84
|
# - name: Connect to Cloud Run
|
|
75
85
|
# uses: ./.github/actions/connect-to-cloud-run@v1
|
|
@@ -31,14 +31,21 @@ jobs:
|
|
|
31
31
|
- name: Setup prerequesites
|
|
32
32
|
uses: ./.github/actions/setup-prereq@v1
|
|
33
33
|
|
|
34
|
-
- name: Connect to
|
|
35
|
-
uses: ./.github/actions/connect-to-gke@v1
|
|
34
|
+
- name: Connect to GKE
|
|
35
|
+
uses: ./.github/actions/k8s/connect-to-gke@v1
|
|
36
36
|
with:
|
|
37
37
|
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
|
|
38
38
|
zone: ${{ secrets.GCLOUD_ZONE }}
|
|
39
39
|
cluster_name: ${{ secrets.GCLOUD_CLUSTER_NAME }}
|
|
40
40
|
service_account_key: ${{ secrets.GCLOUD_SA_KEY }}
|
|
41
41
|
|
|
42
|
+
- name: Connect to Artifact Registry
|
|
43
|
+
uses: ./.github/actions/registry/connect-to-artifact-registry@v1
|
|
44
|
+
with:
|
|
45
|
+
service_account_key: ${{ secrets.GCLOUD_SA_KEY }}
|
|
46
|
+
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
|
|
47
|
+
region: ${{ secrets.GCLOUD_ARTIFACT_REGISTRY_REGION }}
|
|
48
|
+
|
|
42
49
|
# For deploying images to Cloud Run
|
|
43
50
|
# - name: Connect to Cloud Run
|
|
44
51
|
# uses: ./.github/actions/connect-to-cloud-run@v1
|
|
@@ -66,14 +73,21 @@ jobs:
|
|
|
66
73
|
- name: Setup prerequesites
|
|
67
74
|
uses: ./.github/actions/setup-prereq@v1
|
|
68
75
|
|
|
69
|
-
- name: Connect to
|
|
70
|
-
uses: ./.github/actions/connect-to-gke@v1
|
|
76
|
+
- name: Connect to GKE
|
|
77
|
+
uses: ./.github/actions/k8s/connect-to-gke@v1
|
|
71
78
|
with:
|
|
72
79
|
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
|
|
73
80
|
zone: ${{ secrets.GCLOUD_ZONE }}
|
|
74
81
|
cluster_name: ${{ secrets.GCLOUD_CLUSTER_NAME }}
|
|
75
82
|
service_account_key: ${{ secrets.GCLOUD_SA_KEY }}
|
|
76
83
|
|
|
84
|
+
- name: Connect to Artifact Registry
|
|
85
|
+
uses: ./.github/actions/registry/connect-to-artifact-registry@v1
|
|
86
|
+
with:
|
|
87
|
+
service_account_key: ${{ secrets.GCLOUD_SA_KEY }}
|
|
88
|
+
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
|
|
89
|
+
region: ${{ secrets.GCLOUD_ARTIFACT_REGISTRY_REGION }}
|
|
90
|
+
|
|
77
91
|
# For deploying images to Cloud Run
|
|
78
92
|
# - name: Connect to Cloud Run
|
|
79
93
|
# uses: ./.github/actions/connect-to-cloud-run@v1
|
|
@@ -31,10 +31,14 @@ jobs:
|
|
|
31
31
|
- name: Setup prerequesites
|
|
32
32
|
uses: ./.github/actions/setup-prereq@v1
|
|
33
33
|
|
|
34
|
-
- name: Connect to Hetzner
|
|
35
|
-
uses: ./.github/actions/connect-to-hetzner@v1
|
|
34
|
+
- name: Connect to Hetzner K8s
|
|
35
|
+
uses: ./.github/actions/k8s/connect-to-hetzner-k8s@v1
|
|
36
36
|
with:
|
|
37
37
|
kubeconfig: ${{ secrets.HCLOUD_KUBECONFIG }}
|
|
38
|
+
|
|
39
|
+
- name: Connect to Harbor Registry
|
|
40
|
+
uses: ./.github/actions/registry/connect-to-harbor@v1
|
|
41
|
+
with:
|
|
38
42
|
harbor_user: ${{ secrets.HARBOR_USER }}
|
|
39
43
|
harbor_password: ${{ secrets.HARBOR_PASSWORD }}
|
|
40
44
|
|
|
@@ -65,10 +69,14 @@ jobs:
|
|
|
65
69
|
- name: Setup prerequesites
|
|
66
70
|
uses: ./.github/actions/setup-prereq@v1
|
|
67
71
|
|
|
68
|
-
- name: Connect to Hetzner
|
|
69
|
-
uses: ./.github/actions/connect-to-hetzner@v1
|
|
72
|
+
- name: Connect to Hetzner K8s
|
|
73
|
+
uses: ./.github/actions/k8s/connect-to-hetzner-k8s@v1
|
|
70
74
|
with:
|
|
71
75
|
kubeconfig: ${{ secrets.HCLOUD_KUBECONFIG }}
|
|
76
|
+
|
|
77
|
+
- name: Connect to Harbor Registry
|
|
78
|
+
uses: ./.github/actions/registry/connect-to-harbor@v1
|
|
79
|
+
with:
|
|
72
80
|
harbor_user: ${{ secrets.HARBOR_USER }}
|
|
73
81
|
harbor_password: ${{ secrets.HARBOR_PASSWORD }}
|
|
74
82
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name: "Connect to
|
|
2
|
-
description: "Sets up kubernetes connection to
|
|
1
|
+
name: "Connect to DigitalOcean K8s"
|
|
2
|
+
description: "Sets up kubernetes connection to DigitalOcean cluster"
|
|
3
3
|
inputs:
|
|
4
4
|
access_token:
|
|
5
5
|
description: "DigitalOcean access token"
|
|
@@ -15,15 +15,11 @@ runs:
|
|
|
15
15
|
with:
|
|
16
16
|
token: ${{ inputs.access_token }}
|
|
17
17
|
|
|
18
|
-
- name: Log in to DigitalOcean Container Registry with short-lived credentials
|
|
19
|
-
run: doctl registry login --expiry-seconds 1200
|
|
20
|
-
shell: bash
|
|
21
|
-
|
|
22
18
|
- name: Save DigitalOcean kubeconfig with short-lived credentials
|
|
23
|
-
run: |
|
|
19
|
+
run: |
|
|
24
20
|
doctl kubernetes cluster kubeconfig save --expiry-seconds 1200 ${{ inputs.cluster_name }}
|
|
25
21
|
shell: bash
|
|
26
22
|
|
|
27
|
-
- name:
|
|
23
|
+
- name: Verify namespace exists
|
|
28
24
|
run: devops namespace check --env ${{ github.ref_name }}
|
|
29
25
|
shell: bash
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name: "Connect to
|
|
2
|
-
description: "Sets up kubernetes connection to Google
|
|
1
|
+
name: "Connect to GKE"
|
|
2
|
+
description: "Sets up kubernetes connection to Google Kubernetes Engine cluster"
|
|
3
3
|
inputs:
|
|
4
4
|
project_id:
|
|
5
5
|
description: "Google Cloud project ID"
|
|
@@ -25,19 +25,15 @@ runs:
|
|
|
25
25
|
- name: Install gcloud
|
|
26
26
|
uses: google-github-actions/setup-gcloud@v2
|
|
27
27
|
with:
|
|
28
|
-
project_id: ${{ inputs.project_id }}
|
|
29
|
-
|
|
30
|
-
- name: Configure Docker auth
|
|
31
|
-
shell: bash
|
|
32
|
-
run: gcloud --quiet auth configure-docker
|
|
28
|
+
project_id: ${{ inputs.project_id }}
|
|
33
29
|
|
|
34
30
|
- name: Fetch GKE credentials
|
|
35
31
|
uses: google-github-actions/get-gke-credentials@v2
|
|
36
32
|
with:
|
|
37
33
|
cluster_name: ${{ inputs.cluster_name }}
|
|
38
34
|
location: ${{ inputs.zone }}
|
|
39
|
-
project_id: ${{ inputs.project_id }}
|
|
35
|
+
project_id: ${{ inputs.project_id }}
|
|
40
36
|
|
|
41
|
-
- name:
|
|
37
|
+
- name: Verify namespace exists
|
|
42
38
|
run: devops namespace check --env ${{ github.ref_name }}
|
|
43
39
|
shell: bash
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: "Connect to Hetzner K8s"
|
|
2
|
+
description: "Sets up kubernetes connection to Hetzner cluster"
|
|
3
|
+
inputs:
|
|
4
|
+
kubeconfig:
|
|
5
|
+
description: "The Hetzner kubeconfig file"
|
|
6
|
+
required: true
|
|
7
|
+
runs:
|
|
8
|
+
using: "composite"
|
|
9
|
+
steps:
|
|
10
|
+
- name: Create a kubeconfig file
|
|
11
|
+
run: |
|
|
12
|
+
mkdir -p ~/.kube
|
|
13
|
+
echo "${{ inputs.kubeconfig }}" > ~/.kube/config
|
|
14
|
+
chmod 600 ~/.kube/config
|
|
15
|
+
shell: bash
|
|
16
|
+
|
|
17
|
+
- name: Verify cluster connection and that namespace exists
|
|
18
|
+
run: devops namespace check --env ${{ github.ref_name }}
|
|
19
|
+
shell: bash
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: "Connect to Artifact Registry"
|
|
2
|
+
description: "Authenticates to Google Artifact Registry"
|
|
3
|
+
inputs:
|
|
4
|
+
service_account_key:
|
|
5
|
+
description: "Google Cloud service account key in JSON format"
|
|
6
|
+
required: true
|
|
7
|
+
project_id:
|
|
8
|
+
description: "Google Cloud project ID"
|
|
9
|
+
required: true
|
|
10
|
+
region:
|
|
11
|
+
description: "Google Cloud Artifact Registry region (e.g., us-central1)"
|
|
12
|
+
required: true
|
|
13
|
+
runs:
|
|
14
|
+
using: "composite"
|
|
15
|
+
steps:
|
|
16
|
+
- name: Authenticate to Google Cloud
|
|
17
|
+
uses: google-github-actions/auth@v2
|
|
18
|
+
with:
|
|
19
|
+
project_id: ${{ inputs.project_id }}
|
|
20
|
+
credentials_json: ${{ inputs.service_account_key }}
|
|
21
|
+
|
|
22
|
+
- name: Install gcloud
|
|
23
|
+
uses: google-github-actions/setup-gcloud@v2
|
|
24
|
+
with:
|
|
25
|
+
project_id: ${{ inputs.project_id }}
|
|
26
|
+
|
|
27
|
+
- name: Configure Docker auth for Artifact Registry
|
|
28
|
+
shell: bash
|
|
29
|
+
run: gcloud --quiet auth configure-docker ${{ inputs.region }}-docker.pkg.dev
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: "Connect to DOCR"
|
|
2
|
+
description: "Authenticates to DigitalOcean Container Registry"
|
|
3
|
+
inputs:
|
|
4
|
+
access_token:
|
|
5
|
+
description: "DigitalOcean access token"
|
|
6
|
+
required: true
|
|
7
|
+
runs:
|
|
8
|
+
using: "composite"
|
|
9
|
+
steps:
|
|
10
|
+
- name: Install doctl
|
|
11
|
+
uses: digitalocean/action-doctl@v2
|
|
12
|
+
with:
|
|
13
|
+
token: ${{ inputs.access_token }}
|
|
14
|
+
|
|
15
|
+
- name: Log in to DigitalOcean Container Registry with short-lived credentials
|
|
16
|
+
run: doctl registry login --expiry-seconds 1200
|
|
17
|
+
shell: bash
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: "Connect to Harbor Registry"
|
|
2
|
+
description: "Authenticates to Harbor container registry"
|
|
3
|
+
inputs:
|
|
4
|
+
harbor_user:
|
|
5
|
+
description: "The user name for the harbor registry"
|
|
6
|
+
required: true
|
|
7
|
+
harbor_password:
|
|
8
|
+
description: "The password for the harbor registry"
|
|
9
|
+
required: true
|
|
10
|
+
harbor_url:
|
|
11
|
+
description: "The harbor registry URL (optional, uses devops registry server-url if not provided)"
|
|
12
|
+
required: false
|
|
13
|
+
runs:
|
|
14
|
+
using: "composite"
|
|
15
|
+
steps:
|
|
16
|
+
- name: Connect to the registry
|
|
17
|
+
run: |
|
|
18
|
+
if [ -n "${{ inputs.harbor_url }}" ]; then
|
|
19
|
+
server_url="${{ inputs.harbor_url }}"
|
|
20
|
+
else
|
|
21
|
+
server_url=$(devops registry server-url)
|
|
22
|
+
fi
|
|
23
|
+
docker login $server_url -u '${{ inputs.harbor_user }}' -p ${{ inputs.harbor_password }}
|
|
24
|
+
shell: bash
|
package/package.json
CHANGED
|
@@ -31,12 +31,17 @@ jobs:
|
|
|
31
31
|
- name: Setup prerequesites
|
|
32
32
|
uses: ./.github/actions/setup-prereq@v1
|
|
33
33
|
|
|
34
|
-
- name: Connect to
|
|
35
|
-
uses: ./.github/actions/connect-to-
|
|
34
|
+
- name: Connect to DigitalOcean K8s
|
|
35
|
+
uses: ./.github/actions/k8s/connect-to-digitalocean-k8s@v1
|
|
36
36
|
with:
|
|
37
37
|
access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
38
38
|
cluster_name: ${{ secrets.DIGITALOCEAN_CLUSTER_NAME }}
|
|
39
39
|
|
|
40
|
+
- name: Connect to DOCR
|
|
41
|
+
uses: ./.github/actions/registry/connect-to-docr@v1
|
|
42
|
+
with:
|
|
43
|
+
access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
44
|
+
|
|
40
45
|
# For deploying images to Cloud Run
|
|
41
46
|
# - name: Connect to Cloud Run
|
|
42
47
|
# uses: ./.github/actions/connect-to-cloud-run@v1
|
|
@@ -64,12 +69,17 @@ jobs:
|
|
|
64
69
|
- name: Setup prerequesites
|
|
65
70
|
uses: ./.github/actions/setup-prereq@v1
|
|
66
71
|
|
|
67
|
-
- name: Connect to
|
|
68
|
-
uses: ./.github/actions/connect-to-
|
|
72
|
+
- name: Connect to DigitalOcean K8s
|
|
73
|
+
uses: ./.github/actions/k8s/connect-to-digitalocean-k8s@v1
|
|
69
74
|
with:
|
|
70
75
|
access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
71
76
|
cluster_name: ${{ secrets.DIGITALOCEAN_CLUSTER_NAME }}
|
|
72
77
|
|
|
78
|
+
- name: Connect to DOCR
|
|
79
|
+
uses: ./.github/actions/registry/connect-to-docr@v1
|
|
80
|
+
with:
|
|
81
|
+
access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
82
|
+
|
|
73
83
|
# For deploying images to Cloud Run
|
|
74
84
|
# - name: Connect to Cloud Run
|
|
75
85
|
# uses: ./.github/actions/connect-to-cloud-run@v1
|
|
@@ -31,14 +31,21 @@ jobs:
|
|
|
31
31
|
- name: Setup prerequesites
|
|
32
32
|
uses: ./.github/actions/setup-prereq@v1
|
|
33
33
|
|
|
34
|
-
- name: Connect to
|
|
35
|
-
uses: ./.github/actions/connect-to-gke@v1
|
|
34
|
+
- name: Connect to GKE
|
|
35
|
+
uses: ./.github/actions/k8s/connect-to-gke@v1
|
|
36
36
|
with:
|
|
37
37
|
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
|
|
38
38
|
zone: ${{ secrets.GCLOUD_ZONE }}
|
|
39
39
|
cluster_name: ${{ secrets.GCLOUD_CLUSTER_NAME }}
|
|
40
40
|
service_account_key: ${{ secrets.GCLOUD_SA_KEY }}
|
|
41
41
|
|
|
42
|
+
- name: Connect to Artifact Registry
|
|
43
|
+
uses: ./.github/actions/registry/connect-to-artifact-registry@v1
|
|
44
|
+
with:
|
|
45
|
+
service_account_key: ${{ secrets.GCLOUD_SA_KEY }}
|
|
46
|
+
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
|
|
47
|
+
region: ${{ secrets.GCLOUD_ARTIFACT_REGISTRY_REGION }}
|
|
48
|
+
|
|
42
49
|
# For deploying images to Cloud Run
|
|
43
50
|
# - name: Connect to Cloud Run
|
|
44
51
|
# uses: ./.github/actions/connect-to-cloud-run@v1
|
|
@@ -66,14 +73,21 @@ jobs:
|
|
|
66
73
|
- name: Setup prerequesites
|
|
67
74
|
uses: ./.github/actions/setup-prereq@v1
|
|
68
75
|
|
|
69
|
-
- name: Connect to
|
|
70
|
-
uses: ./.github/actions/connect-to-gke@v1
|
|
76
|
+
- name: Connect to GKE
|
|
77
|
+
uses: ./.github/actions/k8s/connect-to-gke@v1
|
|
71
78
|
with:
|
|
72
79
|
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
|
|
73
80
|
zone: ${{ secrets.GCLOUD_ZONE }}
|
|
74
81
|
cluster_name: ${{ secrets.GCLOUD_CLUSTER_NAME }}
|
|
75
82
|
service_account_key: ${{ secrets.GCLOUD_SA_KEY }}
|
|
76
83
|
|
|
84
|
+
- name: Connect to Artifact Registry
|
|
85
|
+
uses: ./.github/actions/registry/connect-to-artifact-registry@v1
|
|
86
|
+
with:
|
|
87
|
+
service_account_key: ${{ secrets.GCLOUD_SA_KEY }}
|
|
88
|
+
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
|
|
89
|
+
region: ${{ secrets.GCLOUD_ARTIFACT_REGISTRY_REGION }}
|
|
90
|
+
|
|
77
91
|
# For deploying images to Cloud Run
|
|
78
92
|
# - name: Connect to Cloud Run
|
|
79
93
|
# uses: ./.github/actions/connect-to-cloud-run@v1
|
|
@@ -31,10 +31,14 @@ jobs:
|
|
|
31
31
|
- name: Setup prerequesites
|
|
32
32
|
uses: ./.github/actions/setup-prereq@v1
|
|
33
33
|
|
|
34
|
-
- name: Connect to Hetzner
|
|
35
|
-
uses: ./.github/actions/connect-to-hetzner@v1
|
|
34
|
+
- name: Connect to Hetzner K8s
|
|
35
|
+
uses: ./.github/actions/k8s/connect-to-hetzner-k8s@v1
|
|
36
36
|
with:
|
|
37
37
|
kubeconfig: ${{ secrets.HCLOUD_KUBECONFIG }}
|
|
38
|
+
|
|
39
|
+
- name: Connect to Harbor Registry
|
|
40
|
+
uses: ./.github/actions/registry/connect-to-harbor@v1
|
|
41
|
+
with:
|
|
38
42
|
harbor_user: ${{ secrets.HARBOR_USER }}
|
|
39
43
|
harbor_password: ${{ secrets.HARBOR_PASSWORD }}
|
|
40
44
|
|
|
@@ -65,10 +69,14 @@ jobs:
|
|
|
65
69
|
- name: Setup prerequesites
|
|
66
70
|
uses: ./.github/actions/setup-prereq@v1
|
|
67
71
|
|
|
68
|
-
- name: Connect to Hetzner
|
|
69
|
-
uses: ./.github/actions/connect-to-hetzner@v1
|
|
72
|
+
- name: Connect to Hetzner K8s
|
|
73
|
+
uses: ./.github/actions/k8s/connect-to-hetzner-k8s@v1
|
|
70
74
|
with:
|
|
71
75
|
kubeconfig: ${{ secrets.HCLOUD_KUBECONFIG }}
|
|
76
|
+
|
|
77
|
+
- name: Connect to Harbor Registry
|
|
78
|
+
uses: ./.github/actions/registry/connect-to-harbor@v1
|
|
79
|
+
with:
|
|
72
80
|
harbor_user: ${{ secrets.HARBOR_USER }}
|
|
73
81
|
harbor_password: ${{ secrets.HARBOR_PASSWORD }}
|
|
74
82
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name: "Connect to
|
|
2
|
-
description: "Sets up kubernetes connection to
|
|
1
|
+
name: "Connect to DigitalOcean K8s"
|
|
2
|
+
description: "Sets up kubernetes connection to DigitalOcean cluster"
|
|
3
3
|
inputs:
|
|
4
4
|
access_token:
|
|
5
5
|
description: "DigitalOcean access token"
|
|
@@ -15,15 +15,11 @@ runs:
|
|
|
15
15
|
with:
|
|
16
16
|
token: ${{ inputs.access_token }}
|
|
17
17
|
|
|
18
|
-
- name: Log in to DigitalOcean Container Registry with short-lived credentials
|
|
19
|
-
run: doctl registry login --expiry-seconds 1200
|
|
20
|
-
shell: bash
|
|
21
|
-
|
|
22
18
|
- name: Save DigitalOcean kubeconfig with short-lived credentials
|
|
23
|
-
run: |
|
|
19
|
+
run: |
|
|
24
20
|
doctl kubernetes cluster kubeconfig save --expiry-seconds 1200 ${{ inputs.cluster_name }}
|
|
25
21
|
shell: bash
|
|
26
22
|
|
|
27
|
-
- name:
|
|
23
|
+
- name: Verify namespace exists
|
|
28
24
|
run: devops namespace check --env ${{ github.ref_name }}
|
|
29
25
|
shell: bash
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name: "Connect to
|
|
2
|
-
description: "Sets up kubernetes connection to Google
|
|
1
|
+
name: "Connect to GKE"
|
|
2
|
+
description: "Sets up kubernetes connection to Google Kubernetes Engine cluster"
|
|
3
3
|
inputs:
|
|
4
4
|
project_id:
|
|
5
5
|
description: "Google Cloud project ID"
|
|
@@ -25,19 +25,15 @@ runs:
|
|
|
25
25
|
- name: Install gcloud
|
|
26
26
|
uses: google-github-actions/setup-gcloud@v2
|
|
27
27
|
with:
|
|
28
|
-
project_id: ${{ inputs.project_id }}
|
|
29
|
-
|
|
30
|
-
- name: Configure Docker auth
|
|
31
|
-
shell: bash
|
|
32
|
-
run: gcloud --quiet auth configure-docker
|
|
28
|
+
project_id: ${{ inputs.project_id }}
|
|
33
29
|
|
|
34
30
|
- name: Fetch GKE credentials
|
|
35
31
|
uses: google-github-actions/get-gke-credentials@v2
|
|
36
32
|
with:
|
|
37
33
|
cluster_name: ${{ inputs.cluster_name }}
|
|
38
34
|
location: ${{ inputs.zone }}
|
|
39
|
-
project_id: ${{ inputs.project_id }}
|
|
35
|
+
project_id: ${{ inputs.project_id }}
|
|
40
36
|
|
|
41
|
-
- name:
|
|
37
|
+
- name: Verify namespace exists
|
|
42
38
|
run: devops namespace check --env ${{ github.ref_name }}
|
|
43
39
|
shell: bash
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: "Connect to Hetzner K8s"
|
|
2
|
+
description: "Sets up kubernetes connection to Hetzner cluster"
|
|
3
|
+
inputs:
|
|
4
|
+
kubeconfig:
|
|
5
|
+
description: "The Hetzner kubeconfig file"
|
|
6
|
+
required: true
|
|
7
|
+
runs:
|
|
8
|
+
using: "composite"
|
|
9
|
+
steps:
|
|
10
|
+
- name: Create a kubeconfig file
|
|
11
|
+
run: |
|
|
12
|
+
mkdir -p ~/.kube
|
|
13
|
+
echo "${{ inputs.kubeconfig }}" > ~/.kube/config
|
|
14
|
+
chmod 600 ~/.kube/config
|
|
15
|
+
shell: bash
|
|
16
|
+
|
|
17
|
+
- name: Verify cluster connection and that namespace exists
|
|
18
|
+
run: devops namespace check --env ${{ github.ref_name }}
|
|
19
|
+
shell: bash
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: "Connect to Artifact Registry"
|
|
2
|
+
description: "Authenticates to Google Artifact Registry"
|
|
3
|
+
inputs:
|
|
4
|
+
service_account_key:
|
|
5
|
+
description: "Google Cloud service account key in JSON format"
|
|
6
|
+
required: true
|
|
7
|
+
project_id:
|
|
8
|
+
description: "Google Cloud project ID"
|
|
9
|
+
required: true
|
|
10
|
+
region:
|
|
11
|
+
description: "Google Cloud Artifact Registry region (e.g., us-central1)"
|
|
12
|
+
required: true
|
|
13
|
+
runs:
|
|
14
|
+
using: "composite"
|
|
15
|
+
steps:
|
|
16
|
+
- name: Authenticate to Google Cloud
|
|
17
|
+
uses: google-github-actions/auth@v2
|
|
18
|
+
with:
|
|
19
|
+
project_id: ${{ inputs.project_id }}
|
|
20
|
+
credentials_json: ${{ inputs.service_account_key }}
|
|
21
|
+
|
|
22
|
+
- name: Install gcloud
|
|
23
|
+
uses: google-github-actions/setup-gcloud@v2
|
|
24
|
+
with:
|
|
25
|
+
project_id: ${{ inputs.project_id }}
|
|
26
|
+
|
|
27
|
+
- name: Configure Docker auth for Artifact Registry
|
|
28
|
+
shell: bash
|
|
29
|
+
run: gcloud --quiet auth configure-docker ${{ inputs.region }}-docker.pkg.dev
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: "Connect to DOCR"
|
|
2
|
+
description: "Authenticates to DigitalOcean Container Registry"
|
|
3
|
+
inputs:
|
|
4
|
+
access_token:
|
|
5
|
+
description: "DigitalOcean access token"
|
|
6
|
+
required: true
|
|
7
|
+
runs:
|
|
8
|
+
using: "composite"
|
|
9
|
+
steps:
|
|
10
|
+
- name: Install doctl
|
|
11
|
+
uses: digitalocean/action-doctl@v2
|
|
12
|
+
with:
|
|
13
|
+
token: ${{ inputs.access_token }}
|
|
14
|
+
|
|
15
|
+
- name: Log in to DigitalOcean Container Registry with short-lived credentials
|
|
16
|
+
run: doctl registry login --expiry-seconds 1200
|
|
17
|
+
shell: bash
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: "Connect to Harbor Registry"
|
|
2
|
+
description: "Authenticates to Harbor container registry"
|
|
3
|
+
inputs:
|
|
4
|
+
harbor_user:
|
|
5
|
+
description: "The user name for the harbor registry"
|
|
6
|
+
required: true
|
|
7
|
+
harbor_password:
|
|
8
|
+
description: "The password for the harbor registry"
|
|
9
|
+
required: true
|
|
10
|
+
harbor_url:
|
|
11
|
+
description: "The harbor registry URL (optional, uses devops registry server-url if not provided)"
|
|
12
|
+
required: false
|
|
13
|
+
runs:
|
|
14
|
+
using: "composite"
|
|
15
|
+
steps:
|
|
16
|
+
- name: Connect to the registry
|
|
17
|
+
run: |
|
|
18
|
+
if [ -n "${{ inputs.harbor_url }}" ]; then
|
|
19
|
+
server_url="${{ inputs.harbor_url }}"
|
|
20
|
+
else
|
|
21
|
+
server_url=$(devops registry server-url)
|
|
22
|
+
fi
|
|
23
|
+
docker login $server_url -u '${{ inputs.harbor_user }}' -p ${{ inputs.harbor_password }}
|
|
24
|
+
shell: bash
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: "Connect to Hetzner"
|
|
2
|
-
description: "Sets up kubernetes connection to Hetzner and ensures connection"
|
|
3
|
-
inputs:
|
|
4
|
-
kubeconfig:
|
|
5
|
-
description: "The Hetzner kubeconfig file"
|
|
6
|
-
required: true
|
|
7
|
-
harbor_user:
|
|
8
|
-
description: "The user name for the harbor registry"
|
|
9
|
-
required: true
|
|
10
|
-
harbor_password:
|
|
11
|
-
description: "The password for the harbor registry"
|
|
12
|
-
required: true
|
|
13
|
-
runs:
|
|
14
|
-
using: "composite"
|
|
15
|
-
steps:
|
|
16
|
-
- name: Create a kubeconfig file
|
|
17
|
-
run: |
|
|
18
|
-
mkdir -p ~/.kube
|
|
19
|
-
echo "${{ inputs.kubeconfig }}" > ~/.kube/config
|
|
20
|
-
chmod 600 ~/.kube/config
|
|
21
|
-
shell: bash
|
|
22
|
-
|
|
23
|
-
- name: Verify cluster connection and that namepsace exists
|
|
24
|
-
run: devops namespace check --env ${{ github.ref_name }}
|
|
25
|
-
shell: bash
|
|
26
|
-
|
|
27
|
-
- name: Connect to the registry
|
|
28
|
-
run: |
|
|
29
|
-
server_url=$(devops registry server-url)
|
|
30
|
-
docker login $server_url -u '${{ inputs.harbor_user }}' -p ${{ inputs.harbor_password }}
|
|
31
|
-
shell: bash
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: "Connect to Hetzner"
|
|
2
|
-
description: "Sets up kubernetes connection to Hetzner and ensures connection"
|
|
3
|
-
inputs:
|
|
4
|
-
kubeconfig:
|
|
5
|
-
description: "The Hetzner kubeconfig file"
|
|
6
|
-
required: true
|
|
7
|
-
harbor_user:
|
|
8
|
-
description: "The user name for the harbor registry"
|
|
9
|
-
required: true
|
|
10
|
-
harbor_password:
|
|
11
|
-
description: "The password for the harbor registry"
|
|
12
|
-
required: true
|
|
13
|
-
runs:
|
|
14
|
-
using: "composite"
|
|
15
|
-
steps:
|
|
16
|
-
- name: Create a kubeconfig file
|
|
17
|
-
run: |
|
|
18
|
-
mkdir -p ~/.kube
|
|
19
|
-
echo "${{ inputs.kubeconfig }}" > ~/.kube/config
|
|
20
|
-
chmod 600 ~/.kube/config
|
|
21
|
-
shell: bash
|
|
22
|
-
|
|
23
|
-
- name: Verify cluster connection and that namepsace exists
|
|
24
|
-
run: devops namespace check --env ${{ github.ref_name }}
|
|
25
|
-
shell: bash
|
|
26
|
-
|
|
27
|
-
- name: Connect to the registry
|
|
28
|
-
run: |
|
|
29
|
-
server_url=$(devops registry server-url)
|
|
30
|
-
docker login $server_url -u '${{ inputs.harbor_user }}' -p ${{ inputs.harbor_password }}
|
|
31
|
-
shell: bash
|