Skip to content

Commit

Permalink
сборка релизов
Browse files Browse the repository at this point in the history
  • Loading branch information
LazarenkoA committed Nov 12, 2023
1 parent 794f8e2 commit a54836f
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 65 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/releaser.yaml
Expand Up @@ -39,6 +39,17 @@ jobs:
- name: Build for Windows
run: GOOS=windows GOARCH=amd64 go build -o prometheus_1C_exporter-windows-amd64.exe -ldflags "-X main.version=${{ steps.get_version.outputs.version }} -X main.gitCommit=${{ github.sha }}"

# получаем коммиты для описания релиза
- name: Get commit messages
id: commit_messages
run: |
PREVIOUS_TAG=$(git for-each-ref refs/tags --sort=-taggerdate --format='%(refname:short)' --count=2 | tail -n 1)
COMMITS=$(git log --pretty=format:"- %s (%h)" $PREVIOUS_TAG..HEAD)
echo "$PREVIOUS_TAG"
echo "$COMMITS"
echo "$(git for-each-ref refs/tags --sort=-taggerdate --format='%(refname:short)' --count=2)"
echo "::set-output name=commits::$COMMITS"
- name: Create release
id: create_release
uses: actions/create-release@v1
Expand All @@ -49,16 +60,12 @@ jobs:
release_name: Release ${{ github.ref }}
body: |
Release ${{ github.ref }} is available.
Commits:
${{ steps.commit_messages.outputs.commits }}
draft: false
prerelease: false

# получаем коммиты для описания релиза
- name: Get commit messages
id: commit_messages
run: |
COMMITS=$(git log --pretty=format:"- %s (%h)" ${{ github.event.release.tag_name }}..HEAD)
echo "::set-output name=commits::$COMMITS"
- name: Upload binaries
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -92,9 +99,4 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: prometheus_1C_exporter-binaries/prometheus_1C_exporter-windows-amd64.exe
asset_name: prometheus_1C_exporter-windows-amd64.exe
asset_content_type: application/octet-stream
release_body: |
Release ${{ github.ref }} is available.
Commits:
${{ steps.commit_messages.outputs.commits }}
asset_content_type: application/octet-stream
93 changes: 41 additions & 52 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions prometheus.yml
@@ -0,0 +1,30 @@
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]

- job_name: '1C_Metrics'
metrics_path: '/1C_Metrics'
static_configs:
- targets: ['host.docker.internal:9091'] # если прометея запускать в докере

0 comments on commit a54836f

Please sign in to comment.