Skip to content

Commit

Permalink
Merge pull request #6798 from DataDog/baptiste.foy/RC-1645/oci-packaging
Browse files Browse the repository at this point in the history
feat(packaging): Add OCI packaging support
  • Loading branch information
BaptisteFoy authored Mar 12, 2024
2 parents 68ee97b + 09be0fb commit a786410
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,40 @@ package-arm:
variables:
PRODUCT_NAME: auto_inject-java

package-oci:
stage: package
extends: .package-oci
when: on_success # this can't use 'needs: [build]', since build is not available in the scheduled pipeline
script:
- ../.gitlab/build_java_package_oci.sh

release-staging-repo-oci-package:
stage: deploy
extends: .release-oci-package
variables:
TARGET_REPO: staging
TARGET_BRANCH: beta
AUTO_RELEASE: $AUTO_RELEASE_STAGING
PRODUCT_NAME: auto_inject-java

release-prod-beta-repo-oci-package:
stage: deploy
extends: .release-oci-package
variables:
TARGET_REPO: prod
TARGET_BRANCH: beta
AUTO_RELEASE: $AUTO_RELEASE_PROD_BETA
PRODUCT_NAME: auto_inject-java

release-prod-repo-oci-package:
stage: deploy
extends: .release-oci-package
variables:
TARGET_REPO: prod
TARGET_BRANCH: stable
AUTO_RELEASE: $AUTO_RELEASE_PROD_STABLE
PRODUCT_NAME: auto_inject-java

deploy_to_reliability_env:
stage: deploy
rules:
Expand Down
21 changes: 21 additions & 0 deletions .gitlab/build_java_package_oci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

if [ -z "$CI_COMMIT_TAG" ] ; then
source ../upstream.env
VERSION=$UPSTREAM_TRACER_VERSION$CI_VERSION_SUFFIX
else
VERSION=${CI_COMMIT_TAG##v}
fi

echo -n "$VERSION" > auto_inject-java.version

mkdir -p sources
cp ../workspace/dd-java-agent/build/libs/*.jar sources/dd-java-agent.jar
cp auto_inject-java.version sources/version

datadog-package create \
--version=$VERSION \
--package=auto_inject-java \
--archive=true \
--archive-path auto_inject-java-$VERSION.tar \
./sources

0 comments on commit a786410

Please sign in to comment.