phovea/generator-phovea

CircleCI config has to be updated to v2.1 to support Slack notifications (again)

Opened this issue · 3 comments

Short description

With the recent updates to the CircleCI web interface, activating the Slack Notifications is not as straightforward as before. You can set the webhook url in Circle CI's web interface and then have to add an Orb to the config:
image

In order to use the Orb, the config needs to be updated to version 2.1 (see CircleCI docs).

Using version 2.1 for the configuration requires some tweaks in addition to adding the Slack Orb. Namely, writing the dockrercfg file by piping data with cat leads to the following error:

Error calling workflow: 'build-nightly'
Error calling job: 'build'

Unclosed '<<' tag in string: 
	'. ~/venv/bin/activate
	
	cat > ~/.dockercfg << EOF
	{
	  "https://index.docker.io/v1/": {
	    "auth": "$DOCKER_AUTH"
	  }
	}
	EOF

	export AWS_DEFAULT_REGION=eu-central-1
	login="$(aws ecr get-login --no-include-email)"
	${login}
	'

('<<' must be escaped in config v2.1+)

I.e., the << needs to be escaped to \<<.

I've already updated one of our products and could update the config here.

@keckelt Thanks for looking into this. Could you please file a PR with the changes?

Yes 👍