Skip to content

Commit e4838ec

Browse files
authored
create a new directory org/opensearch/direct-query/ (opensearch-project#3649)
* Modified workflow to create new direct-query directory for async-query-core and add last commit_id to the metadata file Signed-off-by: Kai Huang <ahkcs@amazon.com> * create a new directory https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/direct-query/ Signed-off-by: Kai Huang <ahkcs@amazon.com> * create a new directory https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/direct-query/ Signed-off-by: Kai Huang <ahkcs@amazon.com> --------- Signed-off-by: Kai Huang <ahkcs@amazon.com>
1 parent f480958 commit e4838ec

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/maven-publish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,30 @@ jobs:
2929
with:
3030
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
3131
aws-region: us-east-1
32+
33+
# Create the initial direct-query directory structure
34+
- name: Create direct-query directory structure in repository
35+
run: |
36+
# Get credentials for publishing
37+
export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
38+
export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
39+
echo "::add-mask::$SONATYPE_USERNAME"
40+
echo "::add-mask::$SONATYPE_PASSWORD"
41+
42+
# Create a placeholder file
43+
TEMP_DIR=$(mktemp -d)
44+
echo "Directory placeholder - $(date)" > "${TEMP_DIR}/.placeholder"
45+
46+
# Upload the placeholder file to create the directory structure
47+
echo "Creating initial directory structure..."
48+
curl -X PUT -u "${SONATYPE_USERNAME}:${SONATYPE_PASSWORD}" \
49+
--upload-file "${TEMP_DIR}/.placeholder" \
50+
"https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/direct-query/.placeholder"
51+
52+
# Clean up
53+
rm -rf "${TEMP_DIR}"
54+
echo "Directory structure created"
55+
3256
- name: publish snapshots to maven
3357
run: |
3458
export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)

0 commit comments

Comments
 (0)