Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin porter components versions #2762

Merged
merged 9 commits into from
Oct 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,19 @@ RUN if [ "${INTERACTIVE}" = "true" ]; then \
# Not using the script from https://cdn.porter.sh/latest/install-linux.sh
# as it installs things we don't need and duplicates the binary.
ARG PORTER_MIRROR=https://cdn.porter.sh
ARG PORTER_PERMALINK=v0.38.13
ARG PORTER_PKG_PERMALINK=latest
ARG PORTER_TERRAFORM_MIXIN_PKG_PERMALINK="v1.0.0-rc.1"
ARG PORTER_VERSION=v0.38.13
ARG PORTER_TERRAFORM_MIXIN_VERSION=v1.0.0-rc.1
ARG PORTER_AZ_MIXIN_VERSION=v0.7.3
ARG PORTER_DOCKER_MIXIN_VERSION=v0.3.0
ARG PORTER_AZURE_PLUGIN_VERSION=v0.11.2
ARG PORTER_HOME=/home/$USERNAME/.porter/
COPY .devcontainer/scripts/porter.sh /tmp/
RUN export PORTER_MIRROR=${PORTER_MIRROR} \
PORTER_PERMALINK=${PORTER_PERMALINK} \
PORTER_PKG_PERMALINK=${PORTER_PKG_PERMALINK} \
PORTER_TERRAFORM_MIXIN_PKG_PERMALINK=${PORTER_TERRAFORM_MIXIN_PKG_PERMALINK} \
PORTER_VERSION=${PORTER_VERSION} \
PORTER_TERRAFORM_MIXIN_VERSION=${PORTER_TERRAFORM_MIXIN_VERSION} \
PORTER_AZ_MIXIN_VERSION=${PORTER_AZ_MIXIN_VERSION} \
PORTER_DOCKER_MIXIN_VERSION=${PORTER_DOCKER_MIXIN_VERSION} \
PORTER_AZURE_PLUGIN_VERSION=${PORTER_AZURE_PLUGIN_VERSION} \
PORTER_HOME=${PORTER_HOME} \
&& /tmp/porter.sh

Expand Down
4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,12 @@
"ms-python.python",
"hashicorp.terraform",
"github.vscode-pull-request-github",
"ms-kubernetes-tools.porter-vscode",
"getporter.porter-vscode",
"davidanson.vscode-markdownlint",
"editorconfig.editorconfig",
"github.vscode-pull-request-github",
"mikestead.dotenv",
"humao.rest-client",
"timonwong.shellcheck",
"ms-azuretools.vscode-bicep",
"ms-azuretools.vscode-azurefunctions"
],
"forwardPorts": [
Expand Down
12 changes: 6 additions & 6 deletions .devcontainer/scripts/porter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ set -o nounset
# set -o xtrace

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

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

chown -R "${USERNAME}" "${PORTER_HOME}"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ENHANCEMENTS:
* `tre` CLI: added `raw` output option, improved `airlock-requests` handling, more consistent exit codes on error, added examples to CLI README.md

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

COMPONENTS:
Expand Down
5 changes: 4 additions & 1 deletion e2e_tests/test_airlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,7 @@ async def test_airlock_flow(verify) -> None:
# 11. delete workspace (cleanup)
LOGGER.info("Deleting workspace")
admin_token = await get_admin_token(verify)
await disable_and_delete_resource(f'/api{workspace_path}', admin_token, verify)
# we don't really care if the workspace is deleted successfully, so not waiting for it.
disable_and_delete_resource(f'/api{workspace_path}', admin_token, verify)
# but still need to wait a bit for the delete request to be issued to the API.
await asyncio.sleep(30)
2 changes: 1 addition & 1 deletion resource_processor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.10"
__version__ = "0.4.11"
12 changes: 6 additions & 6 deletions resource_processor/scripts/porter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ set -o nounset
# set -o xtrace

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

"${PORTER_HOME}/porter" mixin install exec --version "${PORTER_PKG_PERMALINK}"
"${PORTER_HOME}/porter" mixin install terraform --version "${PORTER_TERRAFORM_MIXIN_PKG_PERMALINK}"
"${PORTER_HOME}/porter" mixin install az --version "${PORTER_PKG_PERMALINK}"
"${PORTER_HOME}/porter" plugin install azure --version "${PORTER_PKG_PERMALINK}"
"${PORTER_HOME}/porter" mixin install docker --version "${PORTER_PKG_PERMALINK}"
"${PORTER_HOME}/porter" mixin install exec --version "${PORTER_VERSION}"
"${PORTER_HOME}/porter" mixin install terraform --version "${PORTER_TERRAFORM_MIXIN_VERSION}"
"${PORTER_HOME}/porter" mixin install az --version "${PORTER_AZ_MIXIN_VERSION}"
"${PORTER_HOME}/porter" mixin install docker --version "${PORTER_DOCKER_MIXIN_VERSION}"
"${PORTER_HOME}/porter" plugin install azure --version "${PORTER_AZURE_PLUGIN_VERSION}"
16 changes: 10 additions & 6 deletions resource_processor/vmss_porter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ RUN export AZURE_CLI_VERSION=${AZURE_CLI_VERSION} \

# Install Porter
ARG PORTER_MIRROR=https://cdn.porter.sh
ARG PORTER_PERMALINK=v0.38.13
ARG PORTER_PKG_PERMALINK=latest
ARG PORTER_TERRAFORM_MIXIN_PKG_PERMALINK="v1.0.0-rc.1"
ARG PORTER_VERSION=v0.38.13
ARG PORTER_TERRAFORM_MIXIN_VERSION=v1.0.0-rc.1
ARG PORTER_AZ_MIXIN_VERSION=v0.7.3
ARG PORTER_DOCKER_MIXIN_VERSION=v0.3.0
ARG PORTER_AZURE_PLUGIN_VERSION=v0.11.2
ARG PORTER_HOME=/root/.porter/
COPY scripts/porter.sh /tmp/
RUN export PORTER_MIRROR=${PORTER_MIRROR} \
PORTER_PERMALINK=${PORTER_PERMALINK} \
PORTER_PKG_PERMALINK=${PORTER_PKG_PERMALINK} \
PORTER_TERRAFORM_MIXIN_PKG_PERMALINK=${PORTER_TERRAFORM_MIXIN_PKG_PERMALINK} \
PORTER_VERSION=${PORTER_VERSION} \
PORTER_TERRAFORM_MIXIN_VERSION=${PORTER_TERRAFORM_MIXIN_VERSION} \
PORTER_AZ_MIXIN_VERSION=${PORTER_AZ_MIXIN_VERSION} \
PORTER_DOCKER_MIXIN_VERSION=${PORTER_DOCKER_MIXIN_VERSION} \
PORTER_AZURE_PLUGIN_VERSION=${PORTER_AZURE_PLUGIN_VERSION} \
PORTER_HOME=${PORTER_HOME} \
&& /tmp/porter.sh

Expand Down