Skip to content

Commit

Permalink
[gitlab] Remove artifacts from previous pipelines before building pkgs (
Browse files Browse the repository at this point in the history
#1316)

Now that the cache works, we may have cached pkgs from previous
pipelines in the OMNIBUS_PACKAGE_DIR. Remove them, they clutter
artifacts of the current pipeline and can make build jobs fail when
trying to check/install the current artifacts.
  • Loading branch information
olivielpeau authored Feb 21, 2018
1 parent 3fa016c commit c889987
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ agent_deb-x64:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/datadog-agent-builders/deb_x64:latest
tags: [ "runner:main", "size:large" ]
script:
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
# Artifacts and cache must live within project directory but we run omnibus
# from the GOPATH (see above). We then call `invoke` passing --base-dir,
# pointing to a gitlab-friendly location.
Expand All @@ -178,6 +180,8 @@ agent_rpm-x64:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/datadog-agent-builders/rpm_x64:latest
tags: [ "runner:main", "size:large" ]
script:
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
# Artifacts and cache must live within project directory but we run omnibus
# from the GOPATH (see above). We then call `invoke` passing --base-dir,
# pointing to a gitlab-friendly location.
Expand All @@ -204,6 +208,8 @@ agent_suse-x64:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/datadog-agent-builders/suse_x64:latest
tags: [ "runner:main", "size:large" ]
script:
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
# Artifacts and cache must live within project directory but we run omnibus
# from the GOPATH (see above). We then call `invoke` passing --base-dir,
# pointing to a gitlab-friendly location.
Expand Down Expand Up @@ -238,6 +244,8 @@ build_windows_msi_x64:
stage: package_build
tags: ["runner:windows-agent6"]
script:
# remove artifacts from previous pipelines that may come from the cache
- rm -rf .omnibus/pkg/
- cd %GOPATH%\src\github.com\DataDog\datadog-agent
- inv agent.omnibus-build --release-version %RELEASE_VERSION%
after_script:
Expand All @@ -250,6 +258,8 @@ cluster-agent_deb-x64:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/datadog-agent-builders/deb_x64:latest
tags: [ "runner:main", "size:large" ]
script:
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
# Artifacts and cache must live within project directory but we run omnibus
# from the GOPATH (see above). We then call `invoke` passing --base-dir,
# pointing to a gitlab-friendly location.
Expand All @@ -272,6 +282,8 @@ cluster-agent_rpm-x64:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/datadog-agent-builders/rpm_x64:latest
tags: [ "runner:main", "size:large" ]
script:
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
# Artifacts and cache must live within project directory but we run omnibus
# from the GOPATH (see above). We then call `invoke` passing --base-dir,
# pointing to a gitlab-friendly location.
Expand All @@ -298,6 +310,8 @@ dogstatsd_deb-x64:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/datadog-agent-builders/deb_x64:latest
tags: [ "runner:main", "size:large" ]
script:
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
# Artifacts and cache must live within project directory but we run omnibus
# from the GOPATH (see above). We then call `invoke` passing --base-dir,
# pointing to a gitlab-friendly location.
Expand All @@ -320,6 +334,8 @@ dogstatsd_rpm-x64:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/datadog-agent-builders/rpm_x64:latest
tags: [ "runner:main", "size:large" ]
script:
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
# Artifacts and cache must live within project directory but we run omnibus
# from the GOPATH (see above). We then call `invoke` passing --base-dir,
# pointing to a gitlab-friendly location.
Expand Down Expand Up @@ -347,6 +363,8 @@ dogstatsd_suse-x64:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/datadog-agent-builders/suse_x64:latest
tags: [ "runner:main", "size:large" ]
script:
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
# Artifacts and cache must live within project directory but we run omnibus
# from the GOPATH (see above). We then call `invoke` passing --base-dir,
# pointing to a gitlab-friendly location.
Expand Down

0 comments on commit c889987

Please sign in to comment.