Skip to content

Commit 1471569

Browse files
author
datacore-bolt-ci
committed
ci(stability): merge the develop branch
2 parents af1c433 + bfd274d commit 1471569

File tree

6 files changed

+36
-8
lines changed

6 files changed

+36
-8
lines changed

.github/workflows/helm-chart.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ jobs:
4848
run: nix-shell ./scripts/helm/shell.nix --run "echo"
4949
- name: Generate image list
5050
run: nix-shell ./scripts/helm/shell.nix --run "./scripts/helm/images.sh generate --dependency-update --exit-code"
51+
- name: Login to Docker Hub
52+
uses: docker/login-action@v3
53+
with:
54+
registry: docker.io
55+
username: ${{ secrets.DOCKERHUB_USERNAME }}
56+
password: ${{ secrets.DOCKERHUB_TOKEN }}
5157
- name: BootStrap k8s cluster
5258
if: github.event_name != 'pull_request'
5359
run: nix-shell ./scripts/k8s/shell.nix --run "./scripts/k8s/deployer.sh start --label"

.github/workflows/k8s-ci.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ jobs:
3636
run: nix-shell ./scripts/helm/shell.nix --run "echo"
3737
- name: Pre-populate pytest nix-shell
3838
run: nix-shell ./scripts/python/shell.nix --run "echo"
39+
- name: Login to Docker Hub
40+
if: ${{ !inputs.helm-pins }}
41+
uses: docker/login-action@v3
42+
with:
43+
registry: docker.io
44+
username: ${{ secrets.DOCKERHUB_USERNAME }}
45+
password: ${{ secrets.DOCKERHUB_TOKEN }}
46+
- name: Login to Helm Pins Registry
47+
if: ${{ inputs.helm-pins }}
48+
uses: docker/login-action@v3
49+
with:
50+
registry: ${{ inputs.registry }}
51+
username: ${{ github.actor }}
52+
password: ${{ secrets.GITHUB_TOKEN }}
3953
- name: BootStrap k8s cluster
4054
run: |
4155
sudo debconf-communicate <<< "set man-db/auto-update false" || true
@@ -47,13 +61,6 @@ jobs:
4761
- name: Load images to kind cluster
4862
if: ${{ !inputs.helm-pins }}
4963
run: nix-shell ./scripts/python/shell.nix --run "./scripts/python/upgrade-test-helper.sh --load"
50-
- name: Login to Helm Pins Registry
51-
if: ${{ inputs.helm-pins }}
52-
uses: docker/login-action@v3
53-
with:
54-
registry: ${{ inputs.registry }}
55-
username: ${{ github.actor }}
56-
password: ${{ secrets.GITHUB_TOKEN }}
5764
- name: Create Pinned Helm Chart
5865
id: pin
5966
if: ${{ inputs.helm-pins }}

.github/workflows/nightly-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
jobs:
66
ci:
77
uses: ./.github/workflows/pr-ci.yml
8+
secrets: inherit
89
helm-pins:
910
uses: ./.github/workflows/helm-pins.yml
1011
secrets: inherit

.github/workflows/pr-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ jobs:
1111
uses: ./.github/workflows/lint.yml
1212
helm-ci:
1313
uses: ./.github/workflows/helm-chart.yml
14+
secrets: inherit
1415
int-ci:
1516
uses: ./.github/workflows/unit-int.yml
1617
image-ci:
1718
uses: ./.github/workflows/image-pr.yml
1819
k8s-ci:
1920
uses: ./.github/workflows/k8s-ci.yml
21+
secrets: inherit
2022
bors-ci:
2123
if: ${{ success() }}
2224
needs:

scripts/k8s/deployer.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ LABEL=
1919
CLEANUP="false"
2020
IPFAM="ipv4"
2121
SUDO=${SUDO:-"sudo"}
22+
USE_DOCKER_CFG="true"
2223

2324
help() {
2425
cat <<EOF
@@ -35,6 +36,7 @@ Options:
3536
--label Label worker nodes with the io-engine selector.
3637
--cleanup Prior to starting, stops the running instance of the deployer.
3738
--ip-family <str> KIND has support for IPv4, IPv6 and dual-stack clusters, with the default being ipv4.
39+
--no-login Don't use the docker config json file.
3840
3941
Command:
4042
start Start the k8s cluster.
@@ -120,6 +122,9 @@ while [ "$#" -gt 0 ]; do
120122
;;
121123
esac
122124
;;
125+
--no-login)
126+
USE_DOCKER_CFG="false"
127+
shift;;
123128
--dry-run)
124129
if [ -z "$DRY_RUN" ]; then
125130
DRY_RUN="--dry-run"
@@ -192,6 +197,13 @@ for node_index in $(seq 1 "$WORKERS"); do
192197
containerPath: /var/local/mayastor
193198
propagation: HostToContainer
194199
EOF
200+
DOCKER_CONFIG="$HOME/.docker/config.json"
201+
if [ "$USE_DOCKER_CFG" = "true" ] && [ -f "$DOCKER_CONFIG" ]; then
202+
cat <<EOF >> "$TMP_KIND_CONFIG"
203+
- hostPath: $DOCKER_CONFIG
204+
containerPath: /var/lib/kubelet/config.json
205+
EOF
206+
fi
195207
if [ -n "$LABEL" ]; then
196208
cat <<EOF >> "$TMP_KIND_CONFIG"
197209
labels:

0 commit comments

Comments
 (0)