Skip to content

Commit

Permalink
APIGOV-27565 - cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dfeldick committed May 10, 2024
1 parent 907eb37 commit 9fcf86c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-agents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21

- name: Build discovery agent
working-directory: .
run: |
make build-da
- name: Build traceability agent
working-directory: .
run: |
Expand Down
41 changes: 32 additions & 9 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ jobs:
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "sdkversion=$(grep github.com/Axway/agent-sdk go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT
echo "commit=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
flavor: latest=false
images: ghcr.io/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand All @@ -70,29 +70,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set outputs
id: vars
run: |
echo "date=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "sdkversion=$(grep github.com/Axway/agent-sdk go.mod | awk '{print $2}')" >> $GITHUB_OUTPUT
echo "commit=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
flavor: latest=false
images: ghcr.io/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand All @@ -108,14 +108,37 @@ jobs:
sdk_version=${{ steps.vars.outputs.sdkversion }}
commit_id=${{ steps.vars.outputs.commit }}
archiveHelm:
needs: testAgents
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: olegtarasov/[email protected]
id: tagName
with:
tagRegex: "v(.*)"
tagRegexGroup: 1
- name: Update chart versions
run: |
sed helm/kong-agents/Chart.yaml -i -e "s/^appVersion.*/appVersion:\ \"v${GIT_TAG_NAME}\"/"
sed helm/kong-agents/Chart.yaml -i -e "s/^version.*/version:\ ${GIT_TAG_NAME}/"
- name: Archive chart
run: |
tar czf kong-agents.tgz -C helm/kong-agents .
- name: Upload chart to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: kong-agents.tgz
tag: ${{ github.ref_name }}

notifyTeamsChannel:
runs-on: ubuntu-latest
needs: [buildDiscoveryAgentDocker, buildTraceabilityAgentDocker]
needs: [buildDiscoveryAgentDocker, buildTraceabilityAgentDocker, archiveHelm]
steps:
- uses: actions/checkout@v4
- name: Notify Teams channel
env:
TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }}
TAG: ${{ github.ref_name }}
run: ./release.sh

6 changes: 3 additions & 3 deletions .github/workflows/create-tag-for-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
types:
- closed

jobs:
# only run this job if the merge name is "APIGOV-UpdateSDK", which comes from the automated release
if_SDK_update_merged:
Expand All @@ -20,12 +20,12 @@ jobs:
# by default, this action creates a tag with a 'v' prefix, and bumps the patch version.
# See https://github.com/mathieudutour/github-tag-action to customize these rules.
github_token: ${{ secrets.ACTION_ACCESS_TOKEN }}

- name: Show the new tag
run: |
echo "previous tag ${{ steps.tag_version.outputs.previous_tag }}
echo "new tag ${{ steps.tag_version.outputs.new_tag }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/package-helm-chart.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
working-directory: .
run: |
make test

0 comments on commit 9fcf86c

Please sign in to comment.