Skip to content

Bump github.com/hashicorp/terraform-plugin-docs from 0.20.0 to 0.20.1 #712

Bump github.com/hashicorp/terraform-plugin-docs from 0.20.0 to 0.20.1

Bump github.com/hashicorp/terraform-plugin-docs from 0.20.0 to 0.20.1 #712

Workflow file for this run

#(C) Copyright 2022-2024 Hewlett Packard Enterprise Development LP
name: ci
on:
pull_request:
push:
branches:
- 'master'
jobs:
ci:
needs: ecr_login
runs-on: ubuntu-20.04
env:
BIN_PATH: /tmp/bin
METAL_PROJECT: TestTeam1
METAL_PROJECT_ROLE: project_owner
METAL_HOSTER: TestHoster1
METAL_HOSTER_ROLE: hoster_owner
MACHINES_CHECK_INTERVAL: 30s
MACHINES_CHECK_ATTEMPTS: 20
services:
simulator:
image: 463106798219.dkr.ecr.us-east-1.amazonaws.com/hpe-hcss/quake/simulator:master-simulator
credentials:
username: AWS
password: ${{ needs.ecr_login.outputs.ecr_password }}
ports:
- 80:80
- 3002:3002
env:
AUTH0_ID: ${{ secrets.SIM_AUTH0 }}
PASSWD: ${{ secrets.SIM_PASSWD }}
EMAIL: ${{ secrets.SIM_USER }}
PORTAL_URL: localhost
SKIP_USER_MON: true
options: >-
--health-timeout=30s
--health-start-period=60s
--health-cmd="curl -k http://localhost:3002/info/time"
--name SimPortal
steps:
- name: Checkout workspace
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.7
- name: Install tools
run: make tools
- name: Verify document generation
run: make docs
- name: Build and Install TF plugin
run: make install
- name: Terraform-Lint
uses: actionshub/[email protected]
- name: Run GO linter checks
run: |
TARGET_BRANCH=${{ github.base_ref }}
if [[ ${TARGET_BRANCH} == "" ]]; then
TARGET_BRANCH='master'
fi
TARGET_SHA=`git merge-base -a HEAD origin/${TARGET_BRANCH}`
echo "Running lint on changes from branch ${TARGET_BRANCH} ${TARGET_SHA}"
golangci-lint run --config golangci-lint-config.yaml --new-from-rev ${TARGET_SHA} --verbose --max-issues-per-linter 0 --max-same-issues 0
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.1.7
terraform_wrapper: false
- name: Fetch qctl from Simulator instance
run: |
mkdir -p ${BIN_PATH}
docker cp SimPortal:/var/local/quattro/downloads/qctl/linux/qctl ${BIN_PATH}
chmod +x ${BIN_PATH}/qctl
${BIN_PATH}/qctl -v
- name: Wait for machines to become available
run: |
PASSWD=${{ secrets.SIM_PASSWD }}
EMAIL=${{ secrets.SIM_USER }}
${BIN_PATH}/qctl login --portal http://localhost:3002 -u ${EMAIL} -p ${PASSWD} -m ${METAL_HOSTER} -r ${METAL_HOSTER_ROLE}
total_attempts=$MACHINES_CHECK_ATTEMPTS
remaining=$total_attempts
count=0
while [ $remaining -gt 0 ]; do
# count of available machines
count=`${BIN_PATH}/qctl machines list --format json | jq '.[] | select(.state == "Available")' \
| jq '.state' | wc -l`
# few machines available?
if [[ $count -ge 5 ]]; then
break
fi
remaining=$(($remaining-1))
echo "Remaining attempts: $remaining"
sleep $MACHINES_CHECK_INTERVAL
done
if [[ $remaining -eq 0 ]]; then
echo "machines didn't become available within the wait duration"
exit 1
fi
- name: Run tests
run: |
PASSWD=${{ secrets.SIM_PASSWD }}
EMAIL=${{ secrets.SIM_USER }}
# generate .qjwt file required by the Metal provider
${BIN_PATH}/qctl login --portal http://localhost:3002 -u ${EMAIL} -p ${PASSWD} -m ${METAL_PROJECT} -r ${METAL_PROJECT_ROLE}
export HPEGL_METAL_GL_TOKEN=false
make acceptance
ecr_login:
runs-on: ubuntu-latest
outputs:
ecr_password: ${{ steps.retrieve_password.outputs.ecr_password }}
steps:
- name: Set up AWS CLI
uses: chrislennon/[email protected]
- id: retrieve_password
name: Retrieve ECR password and store as secret
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: echo "::set-output name=ecr_password::$(aws ecr get-login-password)"