Commit Graph

622 Commits

Author SHA1 Message Date
Gary Verhaegen
d80b660210
fix GitHub tag conflict on release (#451)
As multiple platforms will create different annotated tags (because an
annotated tag includes a tag time), they will conflict on trying to
push. Therefore, we go for a lightweight tag for now, as those are
simple pointers to a commit and git will recognize that they are the
same and there is no conflict.
2019-04-12 15:55:20 +01:00
moritzkiefer-da
77033a6a69 Refactor and speed up release script (#431)
This rewrites the release script to be a lot simpler and significantly
faster:

- The artifacts are now declared in a separate yaml file which should
  make it easier for people to modify and doesn’t clutter the actual
  code.
- There is only a constant number of calls to Bazel which speeds up
  the script quite a bit.

I verified that the release artifacts are the same that we got
before and I traced the calls to the jfrog binary in a fake release
and ignoring order they are identical.
2019-04-12 14:57:37 +02:00
Florian Klink
5f962ebf82 CI: Add script to purge old agents (#402)
This adds `ci/azure-cleanup`, containing a script that talks to azure pipelines, removing agents older than 25 hours in a specific pool.
Machines are meant to be killed after 24 hours anyway, make sure they're properly unregistered from Azure Pipelines, too.
By doing this, we don't need to unregister nodes manually on shutdown.

Idea is to execute this every time a new agent is provisioned, it has cloned the repo. We intend to clone the repo and pre-warm the caches there anyhow.

WIP until the repo fetching and cache pre-warming is present, too.

cc @zimbatm 

### Pull Request Checklist

- [x] Read and understand the [contribution guidelines](https://github.com/digital-asset/daml/blob/master/CONTRIBUTING.md)
- [x] Include appropriate tests
- [x] Set a descriptive title and thorough description
- [x] Add a reference to the [issue this PR will solve](https://github.com/digital-asset/daml/issues), if appropriate
- [x] Add a line to the [release notes](https://github.com/digital-asset/daml/blob/master/docs/source/support/release-notes.rst), if appropriate

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with `/AzurePipelines run` to
trigger the build.
2019-04-12 14:56:20 +02:00
Gary Verhaegen
b37474b0e9
require manual publication of GitHub releases (#435)
Because automated testing is not yet part of our release pipeline, we
need to manually publish releases after manual testing.
2019-04-12 13:15:19 +01:00
Michał Majcherski
79bbf5c794
windows: working //:git-revision target (#434) 2019-04-12 13:25:31 +02:00
Gary Verhaegen
6110d4be3a
push releases to github (#413)
Azure Pipelines has direct integration with GitHub, so we're just using
that. Releases on GitHub have to target a tag, so we also need to push
the tag as an intermediate step; we also need to include the platform
name in the artifact to avoid overwriting from different builds.

The two "GitHub release" steps depend on two Azure variables that are
not defined in the pipeline script. This may look like it should not
work, but in fact it does, because these variables are set by the
release script.

In Azure Pipelines, any build step can set variables for the next build
steps by outputting specially-formatted text to stdout. This text will
not appear in the build output displayed by Azure Pipelines, e.g.:

```
echo '##vso[task.setvariable variable=sauce]tomatoes'
```

would define the Azure variable `sauce` to have the string `tomatoes` as
its value for the next build steps.

See [0] for details.

[0]: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#set-in-script
2019-04-12 11:30:13 +01:00
Michał Majcherski
08bd36a10c Windows CI (#364)
* ci: remove the old Jenkins files

* WORKSPACE: remove unuset this_breaks_windows

* ci: add Windows builds to Azure Pipeline
2019-04-11 14:26:55 +02:00
Jonas Chevalier
7c08c86d63
fmt.sh: format and lint checks (#349)
* load dev-env in ./build.sh

one less thing for the user to do

* fmt.sh: extract platform-agnostic checks
2019-04-10 14:22:35 +02:00
Gary Verhaegen
e2aecc2877
build with full history (#333) 2019-04-09 18:19:07 +01:00
zimbatm
430a85649c add more Azure Pipeline agents (#230)
* nix: add the more providers to terraform
* docs: make tarballs more reproducible
* ci: use the linux-pool pool
* ci: tweak the nix installation

handle the case where the user is root and on ubuntu

* infra: terraform fmt

* infra: add Azure Pipeline agents

* ci: only enable linux-pool for internal PRs
2019-04-09 18:59:37 +02:00
moritzkiefer-da
eaa4a1ab47
Fix IS_FORK variable (#246)
Without this PR, this variable ends up being set to the string
"variables['System.PullRequest.IsFork']" which meant that we never
uploaded to the Bazel cache.
2019-04-05 14:24:23 +02:00
Florian Klink
1301a004a8 ci/dev-env-push: use "".format() instead of % 2019-04-04 17:47:40 +02:00
Florian Klink
b3fc3d3cb6 ci/dev-env-push: revert f-string usage
This might be run with a python3 different from the one provided by
dev-env, and not support f-strings yet.
2019-04-04 17:47:40 +02:00
Florian Klink
f0e1b3e3e0 Update ci/build-unix.yml
Co-Authored-By: zimbatm <zimbatm@zimbatm.com>
2019-04-04 16:16:40 +02:00
Florian Klink
2cd3dcb385 Update ci/dev-env-push.py
Co-Authored-By: zimbatm <zimbatm@zimbatm.com>
2019-04-04 16:16:40 +02:00
Florian Klink
a0992cedcc Update ci/build.sh
Co-Authored-By: zimbatm <zimbatm@zimbatm.com>
2019-04-04 16:16:40 +02:00
Florian Klink
3ae87ce775 Update ci/dev-env-push.py
Co-Authored-By: zimbatm <zimbatm@zimbatm.com>
2019-04-04 16:16:40 +02:00
Florian Klink
b49b669ad5 Update ci/build.sh
Co-Authored-By: zimbatm <zimbatm@zimbatm.com>
2019-04-04 16:16:40 +02:00
zimbatm
4e7cba018d fixup! Merge pull request #193 from digital-asset/fixing-sandbox-port-inconsistencies 2019-04-04 16:16:40 +02:00
zimbatm
77c5a4fb4e ci: restore caching on non-forks 2019-04-04 16:16:40 +02:00
zimbatm
ff1c17fd4e ci: disable credentials for now
if forked, the value is `$(SECRET_NAME)` which isn't handled right now
2019-04-04 13:26:26 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00