diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..616522a8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,40 @@ +stages: + - binary_build + +variables: + SRC_PATH: /src/github.com/DataDog/datadog-process-agent + DD_REPO_BRANCH_NAME: $CI_COMMIT_REF_NAME + S3_CP_OPTIONS: --only-show-errors --region us-east-1 --sse AES256 + S3_CP_CMD: aws s3 cp $S3_CP_OPTIONS + S3_ARTEFACTS_URI: s3://dd-ci-artefacts-build-stable/$CI_PROJECT_NAME/$CI_PIPELINE_ID + +before_script: + # We need to install go deps from within the GOPATH, which we set to / on builder images; that's because pointing + # GOPATH to the project folder would be too complex (we'd need to replicate the `src/github/project` scheme). + # So we copy the agent sources to / and bootstrap from there the vendor dependencies before running any job. + - rsync -azr --delete ./ $SRC_PATH + - cd $SRC_PATH + - inv -e deps + + + +# build Agent package for Windows +build_windows_executable: + allow_failure: false + before_script: + - if exist %GOPATH%\src\github.com\DataDog\datadog-process-agent rd /s/q %GOPATH%\src\github.com\DataDog\datadog-process-agent + - mkdir %GOPATH%\src\github.com\DataDog\datadog-process-agent + - xcopy /q/h/e/s * %GOPATH%\src\github.com\DataDog\datadog-process-agent + - cd %GOPATH%\src\github.com\DataDog\datadog-process-agent + stage: binary_build + tags: ["runner:windows-agent6"] + script: + - cd %GOPATH%\src\github.com\DataDog\datadog-process-agent + - rake deps + - rake build +# after_script: +# - '"C:\Program Files\Amazon\AWSCLI\aws.exe" s3 cp --profile ci-datadog-agent %S3_CP_OPTIONS% --recursive --exclude "*" --include "*.msi" .omnibus/pkg/ %S3_ARTEFACTS_URI%/' + artifacts: + expire_in: 2 weeks + paths: + - ./datadog-process-agent.exe