From bfbfbb66c2cbc3396251ff04537710f618666ae0 Mon Sep 17 00:00:00 2001 From: Carles Garcia Cabot Date: Fri, 3 Jan 2025 13:10:56 +0100 Subject: [PATCH] wip --- .github/workflows/release.yml | 81 +++++++++++------------------------ 1 file changed, 25 insertions(+), 56 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b34f1c8b93a..82ba0c0a967 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ on: push: tags: - 'v*' + pull_request: # Needed to login to DockerHub permissions: @@ -11,71 +12,39 @@ permissions: jobs: - asdf: - # This job deploys the latest main commit to the dev environment - if: github.repository == 'grafana/tempo' && github.ref == 'refs/heads/main' + release: + if: github.repository == 'grafana/tempoWIP' # skip in forks runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-tags: true + + - name: fetch tags + - run: git fetch --tags + + - name: generate github token? + run: echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV" + + - name: write-key + run: printf "%s" "$NFPM_SIGNING_KEY" > $NFPM_SIGNING_KEY_FILE + env: + NFPM_SIGNING_KEY: from_secret_gpg_private_key + NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key - name: test release run: make release-snapshot env: - NFPM_DEFAULT_PASSPHRASE: - from_secret: gpg_passphrase + NFPM_DEFAULT_PASSPHRASE: from_secret_gpg_passphrase NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key - get-tag: - if: github.repository == 'grafana/tempo' # skip in forks - runs-on: ubuntu-24.04 - container: - image: jrei/systemd-debian:12 - env: - NODE_ENV: development - ports: - - 80 - volumes: - - my_docker_volume:/volume_mount - options: --cpus 1 - steps: - - name: verify deb install - run: | - set -x - - # Install tempo and check it's running - dpkg -i ${dir}/dist/tempo*_amd64.deb - [ "\$(systemctl is-active tempo)" = "active" ] || (echo "tempo is inactive" && exit 1) + - name: test deb package + run: docker run -it jrei/systemd-debian:12 ./tools/packaging/test-deb.sh - # Wait for tempo to be ready. - apt update && apt install -y curl - ./tools/packaging/wait-for-ready.sh + - name: test rpmp ackage + run: docker run -it jrei/systemd-centos:8 ./tools/packaging/test-deb.sh - centos: - if: github.repository == 'grafana/tempo' # skip in forks - runs-on: ubuntu-24.04 - container: - image: jrei/systemd-centos:8 - env: - NODE_ENV: development - ports: - - 80 - volumes: - - my_docker_volume:/volume_mount - options: --cpus 1 - steps: - - name: verify rpm install - run: | - set -x - - # Import the Grafana GPG key - rpm --import https://packages.grafana.com/gpg.key - - # Install tempo and check it's running - rpm -i ./dist/tempo*_amd64.rpm - [ "\$(systemctl is-active tempo)" = "active" ] || (echo "tempo is inactive" && exit 1) - - # Wait for tempo to be ready. - ./tools/packaging/wait-for-ready.sh \ No newline at end of file + - name: release + run: make release + env: + NFPM_DEFAULT_PASSPHRASE: from_secret_gpg_passphrase + NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key \ No newline at end of file