Skip to content

Commit

Permalink
fix(OCI): Add global git config (#27930)
Browse files Browse the repository at this point in the history
Co-authored-by: BaptisteFoy <baptiste.foy@datadoghq.com>
  • Loading branch information
chouquette and BaptisteFoy authored Jul 25, 2024
1 parent 44245a7 commit dcfa3b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitlab/deploy_packages/oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ include:
- export GH_TOKEN=$(inv -e github.get-token-from-app --app-id-env=GITHUB_APP_ID --pkey-env=GITHUB_KEY_B64)
- export VERSION=$(inv agent.version --url-safe)-1
- git config --global credential.helper '!f() { echo username=x-access-token; echo "password=$GH_TOKEN"; };f'
- ${CI_PROJECT_DIR}/tools/ci/retry.sh git clone --depth=1 https://github.com/DataDog/datadog-packages /tmp/datadog-packages
- ${CI_PROJECT_DIR}/tools/ci/retry.sh git clone -v --depth=1 https://github.com/DataDog/datadog-packages /tmp/datadog-packages
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/"
- export GOPROXY="binaries.ddbuild.io,proxy.golang.org,direct"
- export GONOSUMDB="github.com/DataDog,go.ddbuild.io"
- cd /tmp/datadog-packages/cmd/datadog-package
- go build .
- ./datadog-package push registry.ddbuild.io/ci/remote-updates/${OCI_PRODUCT}:${VERSION} ${OMNIBUS_PACKAGE_DIR}/${OCI_PRODUCT}-${VERSION}.oci.tar
Expand Down
3 changes: 3 additions & 0 deletions .gitlab/packaging/oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
- git config --global credential.helper '!f() { echo username=x-access-token; echo "password=$GH_TOKEN"; };f'
- cd /tmp/
- ${CI_PROJECT_DIR}/tools/ci/retry.sh git clone --depth=1 https://github.com/DataDog/datadog-packages
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf "https://github.com/DataDog/"
- export GOPROXY="binaries.ddbuild.io,proxy.golang.org,direct"
- export GONOSUMDB="github.com/DataDog,go.ddbuild.io"
- cd datadog-packages/cmd/datadog-package
- go build .
- OUTPUT_DIR="/tmp/oci_output"
Expand Down

0 comments on commit dcfa3b9

Please sign in to comment.