Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarocabanas committed Dec 31, 2024
1 parent 49680be commit 10c9360
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 69 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/component_linux_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ jobs:
gpg_passphrase: ${{ env.GPG_PASSPHRASE }}
gpg_private_key_base64: ${{ env.GPG_PRIVATE_KEY_BASE64 }}
disable_lock: ${{ env.DISABLE_LOCK }}
# TODO: remove after testing
dest_prefix: acabanas_molecule_fips/
140 changes: 71 additions & 69 deletions .github/workflows/prerelease_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
DOCKER_HUB_PASSWORD: ${{secrets.OHAI_DOCKER_HUB_PASSWORD}}

packaging-amd64:
needs: [unit-test, proxy-tests]
# needs: [unit-test, proxy-tests]
uses: ./.github/workflows/component_linux_packaging.yml
secrets:
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
Expand All @@ -33,7 +33,7 @@ jobs:
ARCH: 'amd64'

packaging-amd64-fips:
needs: [unit-test, proxy-tests]
# needs: [unit-test, proxy-tests]
uses: ./.github/workflows/component_linux_packaging.yml
secrets:
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
Expand All @@ -48,7 +48,7 @@ jobs:
FIPS: true

packaging-arm:
needs: [unit-test, proxy-tests]
# needs: [unit-test, proxy-tests]
uses: ./.github/workflows/component_linux_packaging.yml
secrets:
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
Expand All @@ -62,7 +62,7 @@ jobs:
ARCH: 'arm'

packaging-arm64:
needs: [unit-test, proxy-tests]
# needs: [unit-test, proxy-tests]
uses: ./.github/workflows/component_linux_packaging.yml
secrets:
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
Expand All @@ -76,7 +76,7 @@ jobs:
ARCH: 'arm64'

packaging-arm64-fips:
needs: [unit-test, proxy-tests]
# needs: [unit-test, proxy-tests]
uses: ./.github/workflows/component_linux_packaging.yml
secrets:
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
Expand All @@ -91,7 +91,7 @@ jobs:
FIPS: true

packaging-legacy:
needs: [unit-test, proxy-tests]
# needs: [unit-test, proxy-tests]
uses: ./.github/workflows/component_linux_packaging.yml
secrets:
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
Expand All @@ -104,25 +104,25 @@ jobs:
TAG: ${{ github.event.release.tag_name }}
ARCH: 'legacy'

packaging-docker:
needs: [unit-test, proxy-tests]
uses: ./.github/workflows/component_docker_packaging.yml
secrets:
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
DOCKER_HUB_PASSWORD: ${{secrets.OHAI_DOCKER_HUB_PASSWORD}}
GPG_MAIL: '[email protected]'
GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }}
GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
TAG: ${{ github.event.release.tag_name }}

docker-trivy-critical:
needs: [packaging-docker]
uses: ./.github/workflows/component_trivy.yml
with:
tag: "${{ github.event.release.tag_name }}-rc"
severity: "CRITICAL"
# packaging-docker:
# needs: [unit-test, proxy-tests]
# uses: ./.github/workflows/component_docker_packaging.yml
# secrets:
# DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
# DOCKER_HUB_PASSWORD: ${{secrets.OHAI_DOCKER_HUB_PASSWORD}}
# GPG_MAIL: '[email protected]'
# GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }}
# GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# TAG: ${{ github.event.release.tag_name }}
#
# docker-trivy-critical:
# needs: [packaging-docker]
# uses: ./.github/workflows/component_trivy.yml
# with:
# tag: "${{ github.event.release.tag_name }}-rc"
# severity: "CRITICAL"

publishing-to-s3:
# point to staging after tests
Expand All @@ -140,7 +140,9 @@ jobs:
AWS_ROLE_SESSION_NAME: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_STAGING }}
with:
ACCESS_POINT_HOST: "staging"
SCHEMA_BRANCH: "master"
# TODO: modify to master after testing
# SCHEMA_BRANCH: "master"
SCHEMA_BRANCH: "NR_351326_linux_prerelease_fips"
RUN_ID: ${{ github.run_id }}
TAG: ${{ github.event.release.tag_name }}
AWS_S3_BUCKET_NAME: "nr-downloads-ohai-staging"
Expand All @@ -154,47 +156,47 @@ jobs:
TAG: ${{ github.event.release.tag_name }}
REPO_ENDPOINT: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent"

test-prerelease-linux:
needs: [molecule-packaging-tests]
uses: ./.github/workflows/component_prerelease_testing.yml
with:
PLATFORM: "linux"
TAG: ${{ github.event.release.tag_name }}
TAG_OR_UNIQUE_NAME: "${{ github.event.release.tag_name }}-linux"
secrets:
AWS_VPC_SUBNET: ${{secrets.AWS_VPC_SUBNET}}
CROWDSTRIKE_CLIENT_ID: ${{secrets.CROWDSTRIKE_CLIENT_ID}}
CROWDSTRIKE_CLIENT_SECRET: ${{secrets.CROWDSTRIKE_CLIENT_SECRET}}
CROWDSTRIKE_CUSTOMER_ID: ${{secrets.CROWDSTRIKE_CUSTOMER_ID}}

canaries-linux:
needs: [test-prerelease-linux]
uses: ./.github/workflows/component_canaries.yml
with:
PLATFORM: "linux"
TAG: ${{ github.event.release.tag_name }}
secrets:
AWS_VPC_SUBNET: ${{secrets.AWS_VPC_SUBNET}}
CROWDSTRIKE_CLIENT_ID: ${{secrets.CROWDSTRIKE_CLIENT_ID}}
CROWDSTRIKE_CLIENT_SECRET: ${{secrets.CROWDSTRIKE_CLIENT_SECRET}}
CROWDSTRIKE_CUSTOMER_ID: ${{secrets.CROWDSTRIKE_CUSTOMER_ID}}

get_previous_tag:
runs-on: ubuntu-latest
outputs:
previous_tag: ${{ steps.previous_tag_step.outputs.PREVIOUS_TAG }}
steps:
- uses: actions/checkout@v2

- id: previous_tag_step
run: ./.github/workflows/scripts/previous_version.sh ${{ github.event.release.tag_name }} >> "$GITHUB_OUTPUT"

prune-previous-canaries-linux:
needs: [canaries-linux, get_previous_tag]
uses: ./.github/workflows/component_canaries_prune.yml
with:
PLATFORM: "linux"
TAG: ${{ needs.get_previous_tag.outputs.previous_tag }}
secrets:
AWS_VPC_SUBNET: ${{secrets.AWS_VPC_SUBNET}}
# test-prerelease-linux:
# needs: [molecule-packaging-tests]
# uses: ./.github/workflows/component_prerelease_testing.yml
# with:
# PLATFORM: "linux"
# TAG: ${{ github.event.release.tag_name }}
# TAG_OR_UNIQUE_NAME: "${{ github.event.release.tag_name }}-linux"
# secrets:
# AWS_VPC_SUBNET: ${{secrets.AWS_VPC_SUBNET}}
# CROWDSTRIKE_CLIENT_ID: ${{secrets.CROWDSTRIKE_CLIENT_ID}}
# CROWDSTRIKE_CLIENT_SECRET: ${{secrets.CROWDSTRIKE_CLIENT_SECRET}}
# CROWDSTRIKE_CUSTOMER_ID: ${{secrets.CROWDSTRIKE_CUSTOMER_ID}}
#
# canaries-linux:
# needs: [test-prerelease-linux]
# uses: ./.github/workflows/component_canaries.yml
# with:
# PLATFORM: "linux"
# TAG: ${{ github.event.release.tag_name }}
# secrets:
# AWS_VPC_SUBNET: ${{secrets.AWS_VPC_SUBNET}}
# CROWDSTRIKE_CLIENT_ID: ${{secrets.CROWDSTRIKE_CLIENT_ID}}
# CROWDSTRIKE_CLIENT_SECRET: ${{secrets.CROWDSTRIKE_CLIENT_SECRET}}
# CROWDSTRIKE_CUSTOMER_ID: ${{secrets.CROWDSTRIKE_CUSTOMER_ID}}
#
# get_previous_tag:
# runs-on: ubuntu-latest
# outputs:
# previous_tag: ${{ steps.previous_tag_step.outputs.PREVIOUS_TAG }}
# steps:
# - uses: actions/checkout@v2
#
# - id: previous_tag_step
# run: ./.github/workflows/scripts/previous_version.sh ${{ github.event.release.tag_name }} >> "$GITHUB_OUTPUT"
#
# prune-previous-canaries-linux:
# needs: [canaries-linux, get_previous_tag]
# uses: ./.github/workflows/component_canaries_prune.yml
# with:
# PLATFORM: "linux"
# TAG: ${{ needs.get_previous_tag.outputs.previous_tag }}
# secrets:
# AWS_VPC_SUBNET: ${{secrets.AWS_VPC_SUBNET}}

0 comments on commit 10c9360

Please sign in to comment.