Doc update + linting + fix CI typo + fix port issue ECR
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
parent
f42a243692
commit
58209b87d1
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -100,13 +100,14 @@ jobs:
|
||||
timeout-minutes: 30
|
||||
services:
|
||||
localstack:
|
||||
image: localstack/localstack:latest
|
||||
image: localstack/localstack:0.12.16
|
||||
env:
|
||||
SERVICES: s3, ecr
|
||||
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
|
||||
ports:
|
||||
- 4566:4566
|
||||
- 4571:4571
|
||||
- 4510:4510
|
||||
options: >-
|
||||
--health-cmd "curl -f http://localhost:4566/health"
|
||||
--health-start-period 5s
|
||||
@ -137,7 +138,7 @@ jobs:
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: test
|
||||
AWS_SECRET_ACCESS_KEY: test
|
||||
AWS_DEFAULT_REGION: eu-east-2
|
||||
AWS_DEFAULT_REGION: us-east-2
|
||||
run: |
|
||||
aws --endpoint-url=http://localhost:4566 s3 mb s3://dagger-ci
|
||||
aws --endpoint-url=http://localhost:4566 ecr create-repository --repository-name dagger-ci
|
||||
|
@ -21,6 +21,7 @@ Re-usable aws-cli component
|
||||
|*config.region* | `string` |AWS region |
|
||||
|*config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|
||||
### aws.#CLI Outputs
|
||||
|
||||
@ -37,6 +38,7 @@ AWS Config shared by all AWS packages
|
||||
|*region* | `string` |AWS region |
|
||||
|*accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*localMode* | `*null \| string` |AWS localstack mode |
|
||||
|
||||
### aws.#Config Outputs
|
||||
|
||||
|
@ -21,6 +21,7 @@ AWS CloudFormation Stack
|
||||
|*config.region* | `string` |AWS region |
|
||||
|*config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|*source* | `string` |Source is the Cloudformation template (JSON/YAML string) |
|
||||
|*stackName* | `string` |Stackname is the cloudformation stack |
|
||||
|*parameters* | `struct` |Stack parameters |
|
||||
|
@ -21,9 +21,11 @@ Convert ECR credentials to Docker Login format
|
||||
|*config.region* | `string` |AWS region |
|
||||
|*config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|*ctr.image.config.region* | `string` |AWS region |
|
||||
|*ctr.image.config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*ctr.image.config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*ctr.image.config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|
||||
### ecr.#Credentials Outputs
|
||||
|
||||
|
@ -21,6 +21,7 @@ KubeConfig config outputs a valid kube-auth-config for kubectl client
|
||||
|*config.region* | `string` |AWS region |
|
||||
|*config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|*clusterName* | `string` |EKS cluster name |
|
||||
|*version* | `*"v1.19.9" \| string` |Kubectl version |
|
||||
|
||||
|
@ -21,6 +21,7 @@ Returns an unused rule priority (randomized in available range)
|
||||
|*config.region* | `string` |AWS region |
|
||||
|*config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|*listenerArn* | `string` |ListenerArn |
|
||||
|
||||
### elb.#RandomRulePriority Outputs
|
||||
|
@ -21,6 +21,7 @@ Creates a new Database on an existing RDS Instance
|
||||
|*config.region* | `string` |AWS region |
|
||||
|*config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|*name* | `string` |DB name |
|
||||
|*dbArn* | `string` |ARN of the database instance |
|
||||
|*secretArn* | `string` |ARN of the database secret (for connecting via rds api) |
|
||||
@ -43,6 +44,7 @@ Fetches information on an existing RDS Instance
|
||||
|*config.region* | `string` |AWS region |
|
||||
|*config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|*dbArn* | `string` |ARN of the database instance |
|
||||
|
||||
### rds.#Instance Outputs
|
||||
@ -64,6 +66,7 @@ Creates a new user credentials on an existing RDS Instance
|
||||
|*config.region* | `string` |AWS region |
|
||||
|*config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|*username* | `string` |Username |
|
||||
|*password* | `string` |Password |
|
||||
|*dbArn* | `string` |ARN of the database instance |
|
||||
|
@ -21,6 +21,7 @@ S3 Bucket object(s) sync
|
||||
|*config.region* | `string` |AWS region |
|
||||
|*config.accessKey* | `dagger.#Secret` |AWS access key |
|
||||
|*config.secretKey* | `dagger.#Secret` |AWS secret key |
|
||||
|*config.localMode* | `*null \| string` |AWS localstack mode |
|
||||
|*source* | `dagger.#Artifact` |Source Artifact to upload to S3 |
|
||||
|*target* | `string` |Target S3 URL (eg. s3://\<bucket-name\>/\<path\>/\<sub-path\>) |
|
||||
|*delete* | `*false \| true` |Delete files that already exist on remote destination |
|
||||
|
@ -10,13 +10,13 @@ import (
|
||||
// AWS Config shared by all AWS packages
|
||||
#Config: {
|
||||
// AWS region
|
||||
region: dagger.#Input & { string }
|
||||
region: dagger.#Input & {string}
|
||||
// AWS access key
|
||||
accessKey: dagger.#Input & { dagger.#Secret }
|
||||
accessKey: dagger.#Input & {dagger.#Secret}
|
||||
// AWS secret key
|
||||
secretKey: dagger.#Input & { dagger.#Secret }
|
||||
secretKey: dagger.#Input & {dagger.#Secret}
|
||||
// AWS localstack mode
|
||||
localMode: dagger.#Input & { string | *null }
|
||||
localMode: dagger.#Input & {string | *null}
|
||||
}
|
||||
|
||||
// Re-usable aws-cli component
|
||||
@ -33,7 +33,7 @@ import (
|
||||
"package": curl: true
|
||||
"package": "aws-cli": "=~1.18"
|
||||
if config.localMode != null {
|
||||
"package": "py3-pip": true
|
||||
package: "py3-pip": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -53,8 +53,8 @@ import (
|
||||
aws configure set default.region "$AWS_DEFAULT_REGION"
|
||||
aws configure set default.cli_pager ""
|
||||
aws configure set default.output "json"
|
||||
"""#,
|
||||
}
|
||||
"""#
|
||||
},
|
||||
if config.localMode != null {
|
||||
#"""
|
||||
# Download awscli v3 and override aws
|
||||
@ -74,8 +74,8 @@ import (
|
||||
echo "[default]" > ~/.aws/credentials
|
||||
echo "aws_access_key_id = $(cat /run/secrets/access_key)" >> ~/.aws/credentials
|
||||
echo "aws_secret_access_key = $(cat /run/secrets/secret_key)" >> ~/.aws/credentials
|
||||
"""#,
|
||||
}
|
||||
"""#
|
||||
},
|
||||
]
|
||||
mount: "/run/secrets/access_key": secret: config.accessKey
|
||||
mount: "/run/secrets/secret_key": secret: config.secretKey
|
||||
|
@ -22,7 +22,7 @@ TestECR: {
|
||||
repository: "125635003186.dkr.ecr.\(TestConfig.awsConfig.region).amazonaws.com/dagger-ci"
|
||||
}
|
||||
if localMode != null {
|
||||
repository: "localhost:4514/dagger-ci"
|
||||
repository: "localhost:4510/dagger-ci"
|
||||
}
|
||||
tag: "test-ecr-\(suffix.out)"
|
||||
|
||||
|
@ -58,9 +58,9 @@ copy_to_sandbox() {
|
||||
cp -a "$source_package" "$target_package"
|
||||
fi
|
||||
}
|
||||
# Check if there is a local kubernetes cluster.
|
||||
# Check if there is a localstack instance.
|
||||
#
|
||||
# This is need to do kubernetes test in the CI.
|
||||
# This is needed to do docs test in the CI.
|
||||
skip_unless_local_localstack() {
|
||||
if [ "$(curl -s http://localhost:4566)" = '{"status": "running"}' ]; then
|
||||
echo "Localstack available"
|
||||
|
Reference in New Issue
Block a user