Skip to content

Commit

Permalink
skip poetry install if cfn module
Browse files Browse the repository at this point in the history
  • Loading branch information
cnfait committed Sep 16, 2024
1 parent 973d7e0 commit ea4ab36
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 49 deletions.
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

0 comments on commit ea4ab36

Please sign in to comment.