Skip to content

Commit 17492e1

Browse files
authored
Pin porter components versions (#2762)
1 parent 30f0030 commit 17492e1

File tree

8 files changed

+39
-29
lines changed

8 files changed

+39
-29
lines changed

.devcontainer/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,19 @@ RUN if [ "${INTERACTIVE}" = "true" ]; then \
5252
# Not using the script from https://cdn.porter.sh/latest/install-linux.sh
5353
# as it installs things we don't need and duplicates the binary.
5454
ARG PORTER_MIRROR=https://cdn.porter.sh
55-
ARG PORTER_PERMALINK=v0.38.13
56-
ARG PORTER_PKG_PERMALINK=latest
57-
ARG PORTER_TERRAFORM_MIXIN_PKG_PERMALINK="v1.0.0-rc.1"
55+
ARG PORTER_VERSION=v0.38.13
56+
ARG PORTER_TERRAFORM_MIXIN_VERSION=v1.0.0-rc.1
57+
ARG PORTER_AZ_MIXIN_VERSION=v0.7.3
58+
ARG PORTER_DOCKER_MIXIN_VERSION=v0.3.0
59+
ARG PORTER_AZURE_PLUGIN_VERSION=v0.11.2
5860
ARG PORTER_HOME=/home/$USERNAME/.porter/
5961
COPY .devcontainer/scripts/porter.sh /tmp/
6062
RUN export PORTER_MIRROR=${PORTER_MIRROR} \
61-
PORTER_PERMALINK=${PORTER_PERMALINK} \
62-
PORTER_PKG_PERMALINK=${PORTER_PKG_PERMALINK} \
63-
PORTER_TERRAFORM_MIXIN_PKG_PERMALINK=${PORTER_TERRAFORM_MIXIN_PKG_PERMALINK} \
63+
PORTER_VERSION=${PORTER_VERSION} \
64+
PORTER_TERRAFORM_MIXIN_VERSION=${PORTER_TERRAFORM_MIXIN_VERSION} \
65+
PORTER_AZ_MIXIN_VERSION=${PORTER_AZ_MIXIN_VERSION} \
66+
PORTER_DOCKER_MIXIN_VERSION=${PORTER_DOCKER_MIXIN_VERSION} \
67+
PORTER_AZURE_PLUGIN_VERSION=${PORTER_AZURE_PLUGIN_VERSION} \
6468
PORTER_HOME=${PORTER_HOME} \
6569
&& /tmp/porter.sh
6670

.devcontainer/devcontainer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,12 @@
255255
"ms-python.python",
256256
"hashicorp.terraform",
257257
"github.vscode-pull-request-github",
258-
"ms-kubernetes-tools.porter-vscode",
258+
"getporter.porter-vscode",
259259
"davidanson.vscode-markdownlint",
260260
"editorconfig.editorconfig",
261-
"github.vscode-pull-request-github",
262261
"mikestead.dotenv",
263262
"humao.rest-client",
264263
"timonwong.shellcheck",
265-
"ms-azuretools.vscode-bicep",
266264
"ms-azuretools.vscode-azurefunctions"
267265
],
268266
"forwardPorts": [

.devcontainer/scripts/porter.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ set -o nounset
66
# set -o xtrace
77

88
mkdir -p "${PORTER_HOME}/runtimes"
9-
curl -fsSLo "${PORTER_HOME}/porter" "${PORTER_MIRROR}/${PORTER_PERMALINK}/porter-linux-amd64"
9+
curl -fsSLo "${PORTER_HOME}/porter" "${PORTER_MIRROR}/${PORTER_VERSION}/porter-linux-amd64"
1010
chmod +x "${PORTER_HOME}/porter"
1111
ln -s "${PORTER_HOME}/porter" "${PORTER_HOME}/runtimes/porter-runtime"
1212

13-
"${PORTER_HOME}/porter" mixin install exec --version "${PORTER_PKG_PERMALINK}"
14-
"${PORTER_HOME}/porter" mixin install terraform --version "${PORTER_TERRAFORM_MIXIN_PKG_PERMALINK}"
15-
"${PORTER_HOME}/porter" mixin install az --version "${PORTER_PKG_PERMALINK}"
16-
"${PORTER_HOME}/porter" plugin install azure --version "${PORTER_PKG_PERMALINK}"
17-
"${PORTER_HOME}/porter" mixin install docker --version "${PORTER_PKG_PERMALINK}"
13+
"${PORTER_HOME}/porter" mixin install exec --version "${PORTER_VERSION}"
14+
"${PORTER_HOME}/porter" mixin install terraform --version "${PORTER_TERRAFORM_MIXIN_VERSION}"
15+
"${PORTER_HOME}/porter" mixin install az --version "${PORTER_AZ_MIXIN_VERSION}"
16+
"${PORTER_HOME}/porter" mixin install docker --version "${PORTER_DOCKER_MIXIN_VERSION}"
17+
"${PORTER_HOME}/porter" plugin install azure --version "${PORTER_AZURE_PLUGIN_VERSION}"
1818

1919
chown -R "${USERNAME}" "${PORTER_HOME}"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ENHANCEMENTS:
1717
* `tre` CLI: added `raw` output option, improved `airlock-requests` handling, more consistent exit codes on error, added examples to CLI README.md
1818

1919
BUG FIXES:
20+
* Pin Porter's plugin/mixin versions used ([#2762](https://github.com/microsoft/AzureTRE/pull/2762))
2021
* Fix issues with AML workspace service deployment ([#2768](https://github.com/microsoft/AzureTRE/pull/2768))
2122

2223
COMPONENTS:

e2e_tests/test_airlock.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,7 @@ async def test_airlock_flow(verify) -> None:
157157
# 11. delete workspace (cleanup)
158158
LOGGER.info("Deleting workspace")
159159
admin_token = await get_admin_token(verify)
160-
await disable_and_delete_resource(f'/api{workspace_path}', admin_token, verify)
160+
# we don't really care if the workspace is deleted successfully, so not waiting for it.
161+
disable_and_delete_resource(f'/api{workspace_path}', admin_token, verify)
162+
# but still need to wait a bit for the delete request to be issued to the API.
163+
await asyncio.sleep(30)

resource_processor/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.4.10"
1+
__version__ = "0.4.11"

resource_processor/scripts/porter.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ set -o nounset
66
# set -o xtrace
77

88
mkdir -p "${PORTER_HOME}/runtimes"
9-
curl -fsSLo "${PORTER_HOME}/porter" "${PORTER_MIRROR}/${PORTER_PERMALINK}/porter-linux-amd64"
9+
curl -fsSLo "${PORTER_HOME}/porter" "${PORTER_MIRROR}/${PORTER_VERSION}/porter-linux-amd64"
1010
chmod +x "${PORTER_HOME}/porter"
1111
ln -s "${PORTER_HOME}/porter" "${PORTER_HOME}/runtimes/porter-runtime"
1212

13-
"${PORTER_HOME}/porter" mixin install exec --version "${PORTER_PKG_PERMALINK}"
14-
"${PORTER_HOME}/porter" mixin install terraform --version "${PORTER_TERRAFORM_MIXIN_PKG_PERMALINK}"
15-
"${PORTER_HOME}/porter" mixin install az --version "${PORTER_PKG_PERMALINK}"
16-
"${PORTER_HOME}/porter" plugin install azure --version "${PORTER_PKG_PERMALINK}"
17-
"${PORTER_HOME}/porter" mixin install docker --version "${PORTER_PKG_PERMALINK}"
13+
"${PORTER_HOME}/porter" mixin install exec --version "${PORTER_VERSION}"
14+
"${PORTER_HOME}/porter" mixin install terraform --version "${PORTER_TERRAFORM_MIXIN_VERSION}"
15+
"${PORTER_HOME}/porter" mixin install az --version "${PORTER_AZ_MIXIN_VERSION}"
16+
"${PORTER_HOME}/porter" mixin install docker --version "${PORTER_DOCKER_MIXIN_VERSION}"
17+
"${PORTER_HOME}/porter" plugin install azure --version "${PORTER_AZURE_PLUGIN_VERSION}"

resource_processor/vmss_porter/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@ RUN export AZURE_CLI_VERSION=${AZURE_CLI_VERSION} \
1010

1111
# Install Porter
1212
ARG PORTER_MIRROR=https://cdn.porter.sh
13-
ARG PORTER_PERMALINK=v0.38.13
14-
ARG PORTER_PKG_PERMALINK=latest
15-
ARG PORTER_TERRAFORM_MIXIN_PKG_PERMALINK="v1.0.0-rc.1"
13+
ARG PORTER_VERSION=v0.38.13
14+
ARG PORTER_TERRAFORM_MIXIN_VERSION=v1.0.0-rc.1
15+
ARG PORTER_AZ_MIXIN_VERSION=v0.7.3
16+
ARG PORTER_DOCKER_MIXIN_VERSION=v0.3.0
17+
ARG PORTER_AZURE_PLUGIN_VERSION=v0.11.2
1618
ARG PORTER_HOME=/root/.porter/
1719
COPY scripts/porter.sh /tmp/
1820
RUN export PORTER_MIRROR=${PORTER_MIRROR} \
19-
PORTER_PERMALINK=${PORTER_PERMALINK} \
20-
PORTER_PKG_PERMALINK=${PORTER_PKG_PERMALINK} \
21-
PORTER_TERRAFORM_MIXIN_PKG_PERMALINK=${PORTER_TERRAFORM_MIXIN_PKG_PERMALINK} \
21+
PORTER_VERSION=${PORTER_VERSION} \
22+
PORTER_TERRAFORM_MIXIN_VERSION=${PORTER_TERRAFORM_MIXIN_VERSION} \
23+
PORTER_AZ_MIXIN_VERSION=${PORTER_AZ_MIXIN_VERSION} \
24+
PORTER_DOCKER_MIXIN_VERSION=${PORTER_DOCKER_MIXIN_VERSION} \
25+
PORTER_AZURE_PLUGIN_VERSION=${PORTER_AZURE_PLUGIN_VERSION} \
2226
PORTER_HOME=${PORTER_HOME} \
2327
&& /tmp/porter.sh
2428

0 commit comments

Comments
 (0)