Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

chore(ci): correctly compute $DIST_TAG in the deploy-code CI job #17067

Closed

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Aug 22, 2020

Previously, the DIST_TAG environment variable was failing to be computed correctly in the deploy-code CI job, because it relied on the non-existent node executable. It worked with the default executor (which includes node), but not with the cloud-sdk executor used in deploy-code, resulting in the following error:

./.circleci/env.sh: line 59: node: command not found
DIST_TAG=

You can see an example failure in the "Set up environment" step logs in https://app.circleci.com/pipelines/github/angular/angular.js/ 170/workflows/32fcacf9-c89b-4020-b3eb-15debe18bb67/jobs/1793

This commit fixes it by computing $DIST_TAG using unix tools (cat, grep, sed) that are available on the docker images of all executors.

Previously, the `DIST_TAG` environment variable was failing to be
computed correctly in the `deploy-code` CI job, because it relied on the
non-existent `node`. It worked with the default executor (which includes
`node`), but not with the `cloud-sdk` executor used in `deploy-code`,
resulting in the following error:

```sh
./.circleci/env.sh: line 59: node: command not found
DIST_TAG=
```

You can see an example failure in the "Set up environment" step logs in
https://app.circleci.com/pipelines/github/angular/angular.js/
170/workflows/32fcacf9-c89b-4020-b3eb-15debe18bb67/jobs/1793

This commit fixes it by computing `$DIST_TAG` using unix tools (`cat`,
`grep`, `sed`) that _are_ available on the docker images of all
executors.
@gkalpak gkalpak mentioned this pull request Aug 22, 2020
4 tasks
@gkalpak gkalpak marked this pull request as ready for review August 22, 2020 18:53
@gkalpak gkalpak changed the title chore(ci): correctly compute the DIST_TAG environment variable chore(ci): correctly compute the $DIST_TAG in the deploy-code CI job Aug 22, 2020
@gkalpak gkalpak changed the title chore(ci): correctly compute the $DIST_TAG in the deploy-code CI job chore(ci): correctly compute $DIST_TAG in the deploy-code CI job Aug 22, 2020
@gkalpak gkalpak closed this in 9679e58 Aug 22, 2020
gkalpak added a commit that referenced this pull request Aug 22, 2020
Previously, the `DIST_TAG` environment variable was failing to be
computed correctly in the `deploy-code` CI job, because it relied on the
non-existent `node` executable. It worked with the default executor
(which includes `node`), but not with the `cloud-sdk` executor used in
`deploy-code`, resulting in the following error:

```sh
./.circleci/env.sh: line 59: node: command not found
DIST_TAG=
```

You can see an example failure in the "Set up environment" step logs in
https://app.circleci.com/pipelines/github/angular/angular.js/
170/workflows/32fcacf9-c89b-4020-b3eb-15debe18bb67/jobs/1793

This commit fixes it by computing `$DIST_TAG` using unix tools (`cat`,
`grep`, `sed`) that _are_ available on the docker images of all
executors.

Closes #17067
@gkalpak gkalpak deleted the chore-ci-fix-latest-code-deployment branch August 22, 2020 19:06
Copy link
Member

@Splaktar Splaktar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure that I understand the sed Regexp, but it works and otherwise LGTM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants