Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip poetry install if cfn module #385

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdlf-datalakeLibrary/deployspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ deploy:
for u in "${deps[@]}"; do
aws s3api get-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" "${u##*/}" || {
curl -L -O "$u"
aws --region "$AWS_REGION" s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
aws s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
}
done
pip3 install setuptools
Expand Down
12 changes: 6 additions & 6 deletions sdlf-dataset/deployspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deploy:
for u in "${deps[@]}"; do
aws s3api get-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" "${u##*/}" || {
curl -L -O "$u"
aws --region "$AWS_REGION" s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
aws s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
}
done
- |-
Expand All @@ -32,11 +32,6 @@ deploy:
pip3 install "cfn-lint<1" cloudformation-cli poetry
npm install -g [email protected]
poetry config virtualenvs.create false --local
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --region "$AWS_REGION" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --region "$AWS_REGION" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
build:
commands:
- |-
Expand Down Expand Up @@ -99,6 +94,11 @@ deploy:
fi
- |-
if [ "$SEEDFARMER_PARAMETER_DEPLOYMENT_TYPE" = "cdk-construct" ]; then
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
poetry config repositories.private "$CA_REPOSITORY_ENDPOINT"
poetry config http-basic.private aws "$CA_TOKEN"
poetry publish --skip-existing --build -r private || exit 1
Expand Down
12 changes: 6 additions & 6 deletions sdlf-foundations/deployspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deploy:
for u in "${deps[@]}"; do
aws s3api get-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" "${u##*/}" || {
curl -L -O "$u"
aws --region "$AWS_REGION" s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
aws s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
}
done
- |-
Expand All @@ -32,11 +32,6 @@ deploy:
pip3 install "cfn-lint<1" cloudformation-cli poetry
npm install -g [email protected]
poetry config virtualenvs.create false --local
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --region "$AWS_REGION" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --region "$AWS_REGION" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
build:
commands:
- |-
Expand Down Expand Up @@ -99,6 +94,11 @@ deploy:
fi
- |-
if [ "$SEEDFARMER_PARAMETER_DEPLOYMENT_TYPE" = "cdk-construct" ]; then
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
poetry config repositories.private "$CA_REPOSITORY_ENDPOINT"
poetry config http-basic.private aws "$CA_TOKEN"
poetry publish --skip-existing --build -r private || exit 1
Expand Down
12 changes: 6 additions & 6 deletions sdlf-pipeline/deployspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deploy:
for u in "${deps[@]}"; do
aws s3api get-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" "${u##*/}" || {
curl -L -O "$u"
aws --region "$AWS_REGION" s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
aws s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
}
done
- |-
Expand All @@ -32,11 +32,6 @@ deploy:
pip3 install "cfn-lint<1" cloudformation-cli poetry
npm install -g [email protected]
poetry config virtualenvs.create false --local
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --region "$AWS_REGION" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --region "$AWS_REGION" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
build:
commands:
- |-
Expand Down Expand Up @@ -99,6 +94,11 @@ deploy:
fi
- |-
if [ "$SEEDFARMER_PARAMETER_DEPLOYMENT_TYPE" = "cdk-construct" ]; then
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
poetry config repositories.private "$CA_REPOSITORY_ENDPOINT"
poetry config http-basic.private aws "$CA_TOKEN"
poetry publish --skip-existing --build -r private || exit 1
Expand Down
12 changes: 6 additions & 6 deletions sdlf-stage-ecsfargate/deployspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deploy:
for u in "${deps[@]}"; do
aws s3api get-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" "${u##*/}" || {
curl -L -O "$u"
aws --region "$AWS_REGION" s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
aws s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
}
done
- |-
Expand All @@ -32,11 +32,6 @@ deploy:
pip3 install "cfn-lint<1" cloudformation-cli poetry
npm install -g [email protected]
poetry config virtualenvs.create false --local
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --region "$AWS_REGION" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --region "$AWS_REGION" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
build:
commands:
- |-
Expand Down Expand Up @@ -99,6 +94,11 @@ deploy:
fi
- |-
if [ "$SEEDFARMER_PARAMETER_DEPLOYMENT_TYPE" = "cdk-construct" ]; then
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
poetry config repositories.private "$CA_REPOSITORY_ENDPOINT"
poetry config http-basic.private aws "$CA_TOKEN"
poetry publish --skip-existing --build -r private || exit 1
Expand Down
12 changes: 6 additions & 6 deletions sdlf-stage-emrserverless/deployspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deploy:
for u in "${deps[@]}"; do
aws s3api get-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" "${u##*/}" || {
curl -L -O "$u"
aws --region "$AWS_REGION" s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
aws s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
}
done
- |-
Expand All @@ -32,11 +32,6 @@ deploy:
pip3 install "cfn-lint<1" cloudformation-cli poetry
npm install -g [email protected]
poetry config virtualenvs.create false --local
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --region "$AWS_REGION" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --region "$AWS_REGION" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
build:
commands:
- |-
Expand Down Expand Up @@ -99,6 +94,11 @@ deploy:
fi
- |-
if [ "$SEEDFARMER_PARAMETER_DEPLOYMENT_TYPE" = "cdk-construct" ]; then
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
poetry config repositories.private "$CA_REPOSITORY_ENDPOINT"
poetry config http-basic.private aws "$CA_TOKEN"
poetry publish --skip-existing --build -r private || exit 1
Expand Down
12 changes: 6 additions & 6 deletions sdlf-stage-glue/deployspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deploy:
for u in "${deps[@]}"; do
aws s3api get-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" "${u##*/}" || {
curl -L -O "$u"
aws --region "$AWS_REGION" s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
aws s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
}
done
- |-
Expand All @@ -32,11 +32,6 @@ deploy:
pip3 install "cfn-lint<1" cloudformation-cli poetry
npm install -g [email protected]
poetry config virtualenvs.create false --local
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --region "$AWS_REGION" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --region "$AWS_REGION" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
build:
commands:
- |-
Expand Down Expand Up @@ -99,6 +94,11 @@ deploy:
fi
- |-
if [ "$SEEDFARMER_PARAMETER_DEPLOYMENT_TYPE" = "cdk-construct" ]; then
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
poetry config repositories.private "$CA_REPOSITORY_ENDPOINT"
poetry config http-basic.private aws "$CA_TOKEN"
poetry publish --skip-existing --build -r private || exit 1
Expand Down
12 changes: 6 additions & 6 deletions sdlf-stage-lambda/deployspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deploy:
for u in "${deps[@]}"; do
aws s3api get-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" "${u##*/}" || {
curl -L -O "$u"
aws --region "$AWS_REGION" s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
aws s3api put-object --bucket "$ARTIFACTS_BUCKET" --key "${u##*/}" --body "${u##*/}"
}
done
- |-
Expand All @@ -32,11 +32,6 @@ deploy:
pip3 install "cfn-lint<1" cloudformation-cli poetry
npm install -g [email protected]
poetry config virtualenvs.create false --local
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --region "$AWS_REGION" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --region "$AWS_REGION" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
build:
commands:
- |-
Expand Down Expand Up @@ -99,6 +94,11 @@ deploy:
fi
- |-
if [ "$SEEDFARMER_PARAMETER_DEPLOYMENT_TYPE" = "cdk-construct" ]; then
CA_ENDPOINT="https://codeartifact.$AWS_REGION.amazonaws.com"
CA_REPOSITORY_ENDPOINT=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-repository-endpoint --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --repository "$SEEDFARMER_PARAMETER_CODEARTIFACT_REPOSITORY" --format pypi --query repositoryEndpoint --output text)
CA_TOKEN=$(aws codeartifact --endpoint-url "$CA_ENDPOINT" get-authorization-token --domain "$SEEDFARMER_PARAMETER_CODEARTIFACT_DOMAIN" --domain-owner "$AWS_ACCOUNT_ID" --query authorizationToken --output text)
poetry source add private "https://aws:${CA_TOKEN}@${CA_REPOSITORY_ENDPOINT#https://}simple/"
poetry install -v
poetry config repositories.private "$CA_REPOSITORY_ENDPOINT"
poetry config http-basic.private aws "$CA_TOKEN"
poetry publish --skip-existing --build -r private || exit 1
Expand Down
Loading
Loading