Commit Graph

52 Commits

Author SHA1 Message Date
Gary Verhaegen
2f01a1c034
reduce ci/cron noise (#8563)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-19 19:12:30 +00:00
Gary Verhaegen
a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00
Gary Verhaegen
93f449d245
rename master to main (#8245)
As we strive for more inclusiveness, we are becoming less comfortable
with historically-charged terms being used in our everyday work.

This is targeted for merge on Dec 26, _after_ the necessary
corresponding changes at both the GitHub and Azure Pipelines levels.

CHANGELOG_BEGIN

- DAML Connect development is now conducted from the `main` branch,
  rather than the `master` one. If you had any dependency on the
  digital-asset/daml repository, you will need to update this parameter.

CHANGELOG_END
2020-12-27 14:19:07 +01:00
Gary Verhaegen
b9c1746abf
add env vars back to azure-cron (#7882)
Looks like I was wrong and [secret variables] do indeed require
explicit mapping:

[secret variables]: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables

> Unlike a normal variable, they are not automatically decrypted into
> environment variables for scripts. You need to explicitly map secret
> variables.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-04 12:42:23 +01:00
Gary Verhaegen
d5060fa94c
sign SDK Docker image (#7868)
Nobody should be using it anyway, but at least now they can trust it's
from us. If they bother to check.

CHANGELOG_BEGIN

- The SDK Docker image is now signed. Reminder: this is a dev-only
  image, with absolutely no support for any kind of production use-case.
  To verify the signature, use the `docker trust inspect` command.
  You can also set the `DOCKER_CONTENT_TRUST` environment variable to 1
  to instruct Docker commands to only pull and run signed images. Keep
  in mind, however, that this only checks that there is a signature, not
  that the signer is who you expect it to be. For optimal security, you
  should manually check the signature once with `docker trust inspect
  --pretty` and then pin the image hash rather than relying on tags.

  The expected output of the `docker sign inspect` command should
  mention a signer named `automation` with a public key ID matching
  533a6e09faa512f974f217668580da1ceb6aa5b00aad34ea1240afc7d249703f
  (note that the `--pretty` output only shows the first 12 chars) and a
  repository key matching
  f5dc2aee6aed2d05d7eda75db7aa2b3fac7fc67afbb880d03535d5a5295a0d3b.

CHANGELOG_END
2020-11-04 10:33:04 +01:00
Gary Verhaegen
67746b7710
ci/cron: add arg to select docs (#7569)
This is a preparatory step for moving at least some of the logic of
checking signatures to this script. The reasoning for putting signatures
in the same script basically boils down to "it already has GitHub
pagination".

I also removed the `run.sh` wrapper because it did not add anything
anymore. It used to be useful, but across various changes it's sort of
lost its purpose.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-05 19:35:09 +02:00
Moritz Kiefer
5668576b78
Upgrade rules-nodejs to the latest release (#6870)
changelog_begin
changelog_end
2020-07-27 16:50:23 +00:00
Gary Verhaegen
4a6ab84b69
add default machine capability (#5912)
add default machine capability

We semi-regularly need to do work that has the potential to disrupt a
machine's local cache, rendering it broken for other streams of work.
This can include upgrading nix, upgrading Bazel, debugging caching
issues, or anything related to Windows.

Right now we do not have any good solution for these situations. We can
either not do those streams of work, or we can proceed with them and
just accept that all other builds may get affected depending on which
machine they get assigned to. Debugging broken nodes is particularly
tricky as we do not have any way to force a build to run on a given
node.

This PR aims at providing a better alternative by (ab)using an Azure
Pipelines feature called
[capabilities](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser#capabilities).
The idea behind capabilities is that you assign a set of tags to a
machine, and then a job can express its
[demands](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/demands?view=azure-devops&tabs=yaml),
i.e. specify a set of tags machines need to have in order to run it.

Support for this is fairly badly documented. We can gather from the
documentation that a job can specify two things about a capability
(through its `demands`): that a given tag exists, and that a given tag
has an exact specified value. In particular, a job cannot specify that a
capability should _not_ be present, meaning we cannot rely on, say,
adding a "broken" tag to broken machines.

Documentation on how to set capabilities for an agent is basically
nonexistent, but [looking at the
code](https://github.com/microsoft/azure-pipelines-agent/blob/master/src/Microsoft.VisualStudio.Services.Agent/Capabilities/UserCapabilitiesProvider.cs)
indicates that they can be set by using a simple `key=value`-formatted
text file, provided we can find the right place to put this file.

This PR adds this file to our Linux, macOS and Windows node init scripts
to define an `assignment` capability and adds a demand for a `default`
value on each job. From then on, when we hit a case where we want a PR
to run on a specific node, and to prevent other PRs from running on that
node, we can manually override the capability from the Azure UI and
update the demand in the relevant YAML file in the PR.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-09 18:21:42 +02:00
Gary Verhaegen
0d65065e60
fix typo in vscode cron (#5800)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-30 14:40:08 +00:00
Gary Verhaegen
681c862d88
fix daml extension upload (#5780)
With the current setup, we always push whatever version GitHub considers
as the latest, which is defined by date. This means that at the moment a
patch release could overwrite a less recent but higher-version release,
essentially downgrading the SDK to a previous, presumably less good user
experience.

This patches the upload process to choose the highest-numbered release
instead of the most recent one by date.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-30 15:10:30 +02:00
Gary Verhaegen
1872c668a5
replace DAML Authors with DA in copyright headers (#5228)
Change requested by Manoj.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 01:26:10 +01:00
Moritz Kiefer
cacbb3a269
Publish docker images for snapshot releases as well (#5205)
* Publish docker images for snapshot releases as well

We got a couple of requests for this and given the current release
process this seems very reasonable. Snapshot releases are clearly
marked as such so I think there this is fine.

We could think about differentiating between a stable release version
marked as a prerelease and not publish the docker image for that but
given our current release process where the stable version is based on
an already existing snapshot and therefore testing is very unlikely to
fail when we mark it as stable, that doesn’t seem worth the complexity
here.

changelog_begin
changelog_end

* Update azure-cron.yml

Co-Authored-By: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-03-26 10:51:15 +01:00
Gary Verhaegen
872a5fc0df
do not send release notes to hubspot (#4956)
@bame-da wants a more manual process where he can control exactly when
release notes are posted, possibly in advance.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-11 21:41:46 +01:00
Gary Verhaegen
47bd131f15
add copyright headers to yml files (#4407)
We seem to have forgotten about them in the copyright scripts.

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-06 12:54:07 +01:00
Gary Verhaegen
00224c2480
ci: alert Slack on PR build completion (#4286)
One of the outputs of our brainstorming about how to make CI better was
that it is annoying to have to "babysit" pull requests. This PR attempts
to introduce a notification mechanism by which Azure will notify people
on Slack when a build finishes, so they know they need to go and rerun
or merge the corresponding PR.

This commit also changes the existing $Slack.URL variable to
$Slack.team-daml, to make more explicit where the Slack message is being
sent to (Slack works with one token per destination channel). Both
$Slack.URL and $Slack.team-daml are currently defined as the same token
in Azure.

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-03 16:29:13 +01:00
Gary Verhaegen
9d8e8d494a
ci cron: tell Slack on failure (#4179)
Currently, when cron jobs fail, this is completely silent. After #4178,
in which we realized the VSCode extension had not been updated for about
a month, I believe it may be a good idea to get error messages sent to
Slack when a cron job fails.

We'll need to monitor for verbosity, but hopefully they will work most
of the time.

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-23 15:28:37 +01:00
Moritz Kiefer
d62006daaa
Fix yarn target in VSCode ext cron job (#4178)
This has changed in 0a26591849 which
broke the build. We only build the latest release so changing this
should be safe and not break older releases.

changelog_begin
changelog_end
2020-01-23 14:07:05 +01:00
Gary Verhaegen
0b1a2d1577 Docker cron: fix, and improve perf (#4055)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-15 18:34:48 +00:00
Gary Verhaegen
e3ec25333e docker cron: ensure nix tools are installed (#4024)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-13 14:05:15 +00:00
Moritz Kiefer
e2df7e7ea3
Build docker images using the Dockerfile for the corresponding tag (#4008)
changelog_begin

- [DAML SDK] Docker images for this release and releases in the future
are built using the Dockerfile of the corresponding git tag and are
therefore stable. Previously, they were updated whenever the
Dockerfile changed.

changelog_end
2020-01-13 11:53:38 +01:00
Gary Verhaegen
f8c247cadf
partial fix for docs cron (#3941)
This commit aims at mitigating two issues we have noticed with the
0.13.41 release:

1. The initial cron run for that release got interrupted at the 50
minutes mark, which happened to be right in the middle of the s3 upload.
This means it had already changed the versions.json file, but had not
finished updating the actual html files. Right now, the docs.daml.com
website shows version 0.13.41 in the drop-down, but actually displays
the content for 0.13.40. Additionally, trying to explicitly visit the
website for 0.13.41 (https://docs.daml.com/0.13.41) yields a 404. Note
that this also means the cron job did not reach the "tell HubSpot"
point, so 0.13.41 did not get announced.
2. As the script also did not reach the "clear cache" step, subsequent
runs have been rebuilding the documentation for no reason as the
sequence of steps was: check versions.json through HTTP, get cached one,
see it's not up-to-date, build docs, check versions.json through s3 API,
bypassing the cache, see it's up-to-date, stop.

To address those issues, this PR changes the cron to:
1. Increase the timeout to 2h instead of 50 minutes.
2. Always check the versions.json file through s3, rather than go
through the HTTP cache first.

These are not complete solutions but I'm not sure how to do better given
that s3 does not have atomic operations.
2020-01-03 14:43:22 +01:00
Gary Verhaegen
1e1e08d3c9
rewrite docs cron in Haskell (#3235) 2019-10-28 18:26:06 +00:00
Gary Verhaegen
4576aed986
sign releases (#2968) 2019-09-24 12:02:29 +01:00
Gary Verhaegen
d44ba4bb1d
reduce risk of double posting to hubspot (#2756) 2019-09-05 10:20:38 +01:00
Gary Verhaegen
78d6ac04b5
explain cron workaround (#2565) 2019-08-16 13:05:11 +01:00
Gary Verhaegen
010950162f Revert "add old releases to hubspot (#2290)" (#2308)
This reverts commit ec70bbcc05.
2019-07-29 08:16:33 +00:00
Gary Verhaegen
af9b0c2a0d
give up on yaml cron (#2302) 2019-07-26 18:51:45 +01:00
Gary Verhaegen
ec70bbcc05
add old releases to hubspot (#2290) 2019-07-26 17:54:03 +01:00
Gary Verhaegen
7e6621732d
split cron definition (#2297) 2019-07-26 13:17:16 +01:00
Gary Verhaegen
7b3be85266
create hubspot blog post on release (#2263) 2019-07-23 15:55:19 +01:00
Gary Verhaegen
631c8e2c62
fix vsce ivocation in cron (#2093) 2019-07-10 20:54:23 +01:00
Gary Verhaegen
a4ea880cf3
get vsce through Bazel rather than nix (#2090) 2019-07-10 15:36:43 +02:00
Moritz Kiefer
4f55cb3bda Fix VSCode extension and remove silly warnings (#2042) 2019-07-08 19:47:38 +00:00
Moritz Kiefer
bb3a98bf61
Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
Gary Verhaegen
36070476c3 collect historical download data (#2003) 2019-07-04 11:23:51 +00:00
Gary Verhaegen
a8f8c7602d publish VSCode extension to marketplace on release (#1876) 2019-06-26 22:48:19 +00:00
Gary Verhaegen
ad84566803 rebuild images if Dockerfile changes (#1850) 2019-06-24 16:37:57 +00:00
Bernhard Elsner
09d3c21ab7 Fix docker path (again) (#1849) 2019-06-24 14:09:23 +00:00
Bernhard Elsner
1000d6fab8
Set path in docker image (#1838) 2019-06-24 14:01:29 +02:00
Gary Verhaegen
62afc96ffd fix escaping in Docker existence check (#1830) 2019-06-23 21:22:30 +00:00
Gary Verhaegen
132df6e3b9 fix docker repo name in cron (#1820) 2019-06-22 16:47:25 +00:00
Gary Verhaegen
095e41d855 build Docker image on cron (#1811) 2019-06-21 18:39:24 +00:00
Gary Verhaegen
e6ee95c544
remove extra 'v' in version string for cron compare (#1812) 2019-06-21 18:34:19 +01:00
Gary Verhaegen
ceceabcc6a
remvoe webide image creation from cron (#1806) 2019-06-21 18:20:46 +01:00
Gary Verhaegen
34eee57369
detect whether docs update should run (#1797) 2019-06-21 17:50:14 +01:00
Gary Verhaegen
d95b9eaeb7 prevent hourly build from running on pr or merge (#1661) 2019-06-13 23:12:06 +00:00
Gary Verhaegen
1428e81f10
update azure-cron.yaml syntax (#1625)
https://docs.microsoft.com/en-us/azure/devops/release-notes/2019/sprint-153-update#azure-pipelines
2019-06-13 14:34:43 +02:00
Bolek@DigitalAsset
2b5c25fa48
webide: build webide image when sdk releases (#1568)
* webide: build webide image when sdk releases

* add scripts which check the latest version of sdk. If webide docker
image version does not exist or is older than the sdk version, it will
kick off a build of the webide docker image

* add job to azure cron

* webide: minor response to review
2019-06-11 19:02:19 -04:00
Gary Verhaegen
c762d491ea target s3 bucket with docs refresh script (#1287)
There is no simple way to configure GCS to serve the desired security
headers, so instead the script will keep updating the existing s3
bucket.

Consequent changes:

- Add aws cli tool to dev-env
- Remove docs bucket from Terraform
2019-05-21 22:26:07 +00:00
Gary Verhaegen
3ff09d7d5e show raw version number in docs dropdown (#1150) 2019-05-21 15:56:29 +00:00