[ github-action ] 新增Agent版本控制

This commit is contained in:
zeaslity
2023-02-08 15:29:46 +08:00
parent 612e053cd9
commit b60bb58e2c
2 changed files with 32 additions and 2 deletions

View File

@@ -133,7 +133,12 @@ jobs:
echo "current time is $(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")"
echo "current time is $(date)"
echo "start to copy target jar"
cp ./agent-*.jar ./octopus-agent-$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g").jar
echo "AGENT_VERSION=$(date --rfc-3339=seconds | cut -d"+" -f1 | sed "s/ /-/g" | sed "s/:/-/g")" >>
$GITHUB_ENV
cp ./agent-*.jar ./octopus-agent-${{ env.AGENT_VERSION }}.jar
cd /home/runner/work/ProjectOctopus/ProjectOctopus
echo "--------------------------------------"
cat /proc/cpuinfo
@@ -151,6 +156,28 @@ jobs:
rm: true
strip_components: 2
- name: RabbitMQ Message Sender
# You may pin to the exact commit or the version.
# uses: eferraris/rabbit-sender@aca1775ecffe3bce07cf6503089008fa20412e9f
uses: eferraris/rabbit-sender@v1.1
with:
# Rabbit Username
RABBIT_USERNAME: ${{ secrets.RABBIT_USER }}
# Rabbit Password
RABBIT_PASSWORD: ${{ secrets.RABBIT_PASS }}
# Rabbit Hostname
RABBIT_HOST: 43.154.83.213
# RabbitMQ Port
RABBIT_PORT: 20672
# Use SSL
RABBIT_USE_SSL: false
# Name for the queue
RABBIT_QUEUE_NAME: "OctopusToServer"
# Message to be sent
MESSAGE: {"uuid":"Octopus-Server","init_time": ${{ env.AGENT_VERSION }},"type":"AGENT","content":${{ env.AGENT_VERSION }},"result": ${{ env.AGENT_VERSION }},"ac_time": ${{ env.AGENT_VERSION }}}
# Durability for the queue
DURABLE: true
# - name: Setup Maven settings.xml
# uses: whelk-io/maven-settings-xml-action@v11
# with:

View File

@@ -1,4 +1,7 @@
package io.wdd.rpc.openfeign;
public class AgentOperationFeign {
import org.springframework.cloud.openfeign.FeignClient;
@FeignClient(url = "")
public interface AgentOperationFeign {
}