debian-forge-composer/schutzbot
Tomas Hozza aa1d038b59 cloud-cleaner: clean up image and vm after GCP integration test
Extend internal GCP library to allow deleting Compute Node image and
instance. In addition provide function to load service account
credentials file content from the environment.

Change names used for GCP image and instance in `api.sh` integration
test to make them predictable. This is important, so that cloud-cleaner
can identify potentially left over resources and clean them up. Use the
same approach for generating predictable, but run-specific, test ID as
in GenerateCIArtifactName() from internal/test/helpers.go. Use SHA224
to generate a hash from the string, because it can contain characters
not allowed by GCP for resource name (specifically "_" e.g. in "x86_64").
SHA-224 was picked because it generates short enough output and it is
future proof for use in RHEL (unlike MD5 or SHA-1).

Refactor cloud-cleaner to clean up GCP resources and also to run cleanup
for each cloud in a separate goroutine.

Modify run_cloud_cleaner.sh to be able to run in environment in which
AZURE_CREDS is not defined.

Always run cloud-cleaner after integration tests for rhel8, rhel84 and
cs8, which test GCP.

Define DISTRO_CODE for each integration testing stage in Jenkinsfile.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-03-15 16:48:40 +00:00
..
ci_details.sh tests: Fail if python36 is installed. Closes #794 2020-10-19 11:21:39 +03:00
containerbuild.sh containers: simplify Dockerfile and container build 2020-12-22 15:27:39 +01:00
deploy.sh Schutzbot: Allow overriding internal RHEL URL 2021-03-12 20:38:06 +02:00
Jenkinsfile cloud-cleaner: clean up image and vm after GCP integration test 2021-03-15 16:48:40 +00:00
mockbuild.sh Schutzbot: Allow overriding internal RHEL URL 2021-03-12 20:38:06 +02:00
prepare-rhel-internal.sh tests: Refresh COMPOSE_ID file if COMPOSE_URL was defined from ENV 2021-03-15 14:20:25 +02:00
run_cloud_cleaner.sh cloud-cleaner: clean up image and vm after GCP integration test 2021-03-15 16:48:40 +00:00
send_webhook.py Send webhooks without credentials 2021-02-10 18:31:56 +00:00
team_ssh_keys.txt schutzbot: use the new obudai's ssh key 2020-12-01 08:27:44 +01:00