Skip to content

Commit

Permalink
Merge pull request #500 from duanmengkk/feature_globalnode
Browse files Browse the repository at this point in the history
add workflows ci for upload dev images
  • Loading branch information
duanmengkk authored Apr 30, 2024
2 parents 4b06564 + cce43b5 commit bbe8125
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 18 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/dev_images.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: Dev Images
name: Upload Images
on:
push:
pull_request:
workflow_dispatch:
branches:
- main
jobs:
images:
runs-on: ubuntu-latest
permissions: write-all
# not trigger on 'kosmos-io/kosmos'
if: github.repository != 'kosmos-io/kosmos'
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -19,15 +17,9 @@ jobs:
- name: Login registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0
- name: Push images
env:
ON_PLUGINS: true
REGISTRY: ghcr.io/${{ github.repository_owner }}/${{ github.repository_name }}
TAG: ${{ steps.previoustag.outputs.tag }}
TAG: latest
run: |
make upload-images REGISTRY=${REGISTRY%?} VERSION=$TAG
make upload-images VERSION=$TAG
33 changes: 33 additions & 0 deletions .github/workflows/dev_images_personal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Latest image to DockerHub
on:
push:
pull_request:
workflow_dispatch:
jobs:
images:
runs-on: ubuntu-latest
permissions: write-all
# not trigger on 'kosmos-io/kosmos'
if: github.repository != 'kosmos-io/kosmos'
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up qemu
uses: docker/setup-qemu-action@v2
- name: Login registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0
- name: Push images
env:
ON_PLUGINS: true
REGISTRY: ghcr.io/${{ github.repository_owner }}/${{ github.repository_name }}
TAG: ${{ steps.previoustag.outputs.tag }}
run: |
make upload-images REGISTRY=${REGISTRY%?} VERSION=$TAG
1 change: 0 additions & 1 deletion hack/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ function addTaint() {
local member_cluster=$2
leafnode="kosmos-${member_cluster}"
HOST_CLUSTER_DIR="${ROOT}/environments/${host_cluster}"
MEMBER_CLUSTER_DIR="${ROOT}/environments/${member_cluster}"

sleep 100 && kubectl --kubeconfig $HOST_CLUSTER_DIR/kubeconfig get node -owide
kubectl --kubeconfig $HOST_CLUSTER_DIR/kubeconfig taint nodes $leafnode test-node/e2e=leafnode:NoSchedule
Expand Down
4 changes: 0 additions & 4 deletions hack/node-agent/node-agent.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ User=root
Group=root
WorkingDirectory=/srv/node-agent
EnvironmentFile=-/srv/node-agent/agent.env
#./app: error while loading shared libraries: libz.so.1: failed to map segment from shared object
Environment="TMPDIR=/srv/node-agent"
#ExecStartPre=-/usr/bin/pip3 install -r /srv/node-agent/requirements.txt
#ExecStart=/usr/bin/env python3 /srv/node-agent/app.py
#ExecStart=/srv/node-agent/app
ExecStart=/srv/node-agent/node-agent
Restart=on-failure
RestartSec=5
Expand Down

0 comments on commit bbe8125

Please sign in to comment.