Hello, I am new Octopus user, trying to discover octopus. I hope you understand my question. English is not my native language.
I have a question about the Octopus env. variables. I have created serveral powershell based steps to deploy docker containers in a dev and a test environment. But the setup of the docker engine (servers, path, locations, etc) differs between the different environments: “dev” is my notebook, “test” is a server.
How can I determine the location ( for example: on my laptop (running a octopus agent)) where a github packages (containing: dockerfile) is downloaded and extracted.
In the Octopus steps I have configured/created for my project; I currently use fixed paths. These fixed path are not identical in all environments. If possible I hope that I can you somekind of Octopus environments variables to make a deployment flexible; so that a step can be used in dev and in test (on different servers)
Is this possible??
My basic workflow:
- My first step is to pull a dockerfile from a github repo. After this step is can see the local file location in the release information.
== ==
AC Version Location
June 11th 2018 09:58:48
Info
June 11th 2018 09:58:48
Info
True v4.0.30319 C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll
June 11th 2018 09:58:48
Info
Repository will be cloned to: D:\Octopus\Applications\GitPull\Development\Build&Deploy a Dockerbased container\Pull this container
June 11th 2018 09:58:48
Info
Reinitialized existing Git repository in D:/Octopus/Applications/GitPull/Development/Build&Deploy a Dockerbased container/Pull this container/.git/
June 11th 2018 09:58:49
Info
Fetching remote repository
June 11th 2018 09:58:50
Info
Check out branch master
June 11th 2018 09:58:50
Info
HEAD is now at 2536321 nieuw plaatje
June 11th 2018 09:58:50
Info
Repository successfully cloned to: D:\Octopus\Applications\GitPull\Development\Build&Deploy a Dockerbased container\Pull this container
== ==
- Second step is building the container; based on the location discovered in step 1; this is a currently fixed location in a powershell script.
== ==
d:
cd “D:\Octopus\Applications\GitPull\Development\Build&Deploy a Dockerbased container\Git - Pull (HTTPS)”
docker build --rm -t websiteinadocker .
cd
== ==
Is it possible to determine the path of the pulled and extracted github packaged??
Grtz Fred