Skip to content

ROX-13838: deprovision disgraced centrals #5094

ROX-13838: deprovision disgraced centrals

ROX-13838: deprovision disgraced centrals #5094

Workflow file for this run

# This runs checks to verify if code is properly formatted and that tests (unit and integration against a mocked environment) are passing.
name: Verify & Test
on:
push:
branches:
- main
paths-ignore:
- '*.md'
- '*.sh'
- '.github/*.md'
- '.github/workflows/openapi_update.yaml'
- '.github/CODEOWNERS'
- 'templates/**'
- '.openapi-generator-ignore'
- 'openapi/**'
- 'docs/**'
- 'pkg/api/openapi/docs/**'
- 'pkg/api/openapi/.openapi-generator-ignore'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '*.md'
- '*.sh'
- '.github/*.md'
- '.github/workflows/openapi_update.yaml'
- '.github/CODEOWNERS'
- 'templates/**'
- '.openapi-generator-ignore'
- 'openapi/**'
- 'docs/**'
- 'pkg/api/openapi/docs/**'
- 'pkg/api/openapi/.openapi-generator-ignore'
# TODO make sure that the secrets are configured for your repository
env:
# set ocm env to integration
OCM_ENV: integration
# Dummy SSO variables
SSO_CLIENT_ID: ${{ secrets.SSO_CLIENT_ID }}
SSO_CLIENT_SECRET: ${{ secrets.SSO_CLIENT_SECRET }}
OSD_IDP_SSO_CLIENT_ID: ${{ secrets.OSD_IDP_SSO_CLIENT_ID }}
OSD_IDP_SSO_CLIENT_SECRET: ${{ secrets.OSD_IDP_SSO_CLIENT_SECRET }}
# Dummy AWS credentials
AWS_ACCOUNT_ID: aws_accountid
AWS_ACCESS_KEY: aws_accesskey
AWS_SECRET_ACCESS_KEY: aws_secretaccesskey # pragma: allowlist secret - dummy value
ROUTE53_ACCESS_KEY: aws_route53_access_key # pragma: allowlist secret - dummy value
ROUTE53_SECRET_ACCESS_KEY: aws_route53_secret_access_key # pragma: allowlist secret - dummy value
# Dummy Central TLS env variables
CENTRAL_TLS_CERT: central_tls_cert # pragma: allowlist secret - dummy value
CENTRAL_TLS_KEY: central_tls_key # pragma: allowlist secret - dummy value
# So that OCM secrets are initialised
DOCKER_PR_CHECK: true
TEST_TIMEOUT: 30m
jobs:
verify-test:
name: "Verify & Test"
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
env:
POSTGRES_PASSWORD: foobar-bizz-buzz # pragma: allowlist secret - dummy value
POSTGRES_USER: fleet_manager
POSTGRES_DB: serviceapitests
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Cancel Previous Runs
uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go 1.20
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Cache go module
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup tests secrets
run: |
make ocm/setup aws/setup redhatsso/setup centralcert/setup observatorium/setup secrets/touch
- name: Run Migration Script
run: make db/migrate
- name: Verify & Test
run: |
GOPATH=$(go env GOPATH)
export GOPATH
export PATH=${PATH}:$GOPATH/bin
make verify binary test test/integration
timeout-minutes: 14
- name: Build and publish fleet* image to quay.io
if: github.event_name == 'push'
env:
QUAY_USER: ${{ secrets.QUAY_RHACS_ENG_FM_RW_USERNAME }}
QUAY_TOKEN: ${{ secrets.QUAY_RHACS_ENG_FM_RW_PASSWORD }}
QUAY_IMAGE_REPOSITORY: rhacs-eng/fleet-manager
run: |
chmod +x ./build_push_fleet_manager.sh
./build_push_fleet_manager.sh