Skip to content
Snippets Groups Projects
Commit b08afb4d authored by Alex Maras's avatar Alex Maras
Browse files

test: upload artifacts using zip

parent 86afc7b3
No related branches found
No related tags found
No related merge requests found
terraform {
backend "http" {}
}
data "archive_file" "test_artifact" {
type = "zip"
output_path = "test-artifact.zip"
source {
content = "test artifact inner value"
filename = "file-inside-archive.txt"
}
}
include:
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/validate-plan-apply@$CI_COMMIT_SHA
inputs:
image_registry_base: $GITLAB_OPENTOFU_IMAGE_BASE
version: $CI_COMMIT_SHA
base_os: $GITLAB_OPENTOFU_BASE_IMAGE_OS
opentofu_version: $OPENTOFU_VERSION
root_dir: $TEST_GITLAB_TOFU_ROOT_DIR
state_name: $TEST_GITLAB_TOFU_STATE_NAME
fmt_rules: [{when: on_success}]
validate_rules: [{when: on_success}]
plan_rules: [{when: on_success}]
apply_rules: [{when: on_success}]
# For CI Terraform state cleanup
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/delete-state@$CI_COMMIT_SHA
inputs:
stage: cleanup
state_name: $TEST_GITLAB_TOFU_STATE_NAME
rules: [{when: always}]
stages: [validate, build, deploy, cleanup]
...@@ -194,3 +194,20 @@ id-tokens: ...@@ -194,3 +194,20 @@ id-tokens:
- alpine - alpine
- debian - debian
upload-artifacts:
stage: test-integration
variables:
OPENTOFU_VERSION: $LATEST_OPENTOFU_VERSION
TEST_GITLAB_TOFU_STATE_NAME: ci-integration-$CI_JOB_NAME_SLUG-$CI_PIPELINE_IID-$CI_NODE_INDEX
TEST_GITLAB_TOFU_ROOT_DIR: tests/iac-upload-artifacts
trigger:
include: tests/integration-tests/$PIPELINE_NAME.gitlab-ci.yml
strategy: depend
parallel:
matrix:
- PIPELINE_NAME:
- UploadArtifacts
GITLAB_OPENTOFU_BASE_IMAGE_OS:
- alpine
- debian
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment