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

Version tags to docker images #2315

Closed
ronkot opened this issue Apr 13, 2018 · 5 comments
Closed

Version tags to docker images #2315

ronkot opened this issue Apr 13, 2018 · 5 comments
Assignees
Labels
AREA: docker STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: enhancement The accepted proposal for future implementation.
Milestone

Comments

@ronkot
Copy link

ronkot commented Apr 13, 2018

Are you requesting a feature or reporting a bug?

Enhancement

What is the current behavior?

Only tags latest, alpha and dev for testcafe docker images

What is the expected behavior?

In addition to current tags a unique version tag for each release. For example: testcafe/testcafe:0.19.1

Reasoning

Without specific version tags our CI tests will fail when a non-backwards compatible image with latest tag is released. I'd like to pin a specific version to be used in CI.

@miherlosev miherlosev added the TYPE: enhancement The accepted proposal for future implementation. label May 11, 2018
@neelakansha85
Copy link

Thanks for supporting the docker image, I am planning to use your image for our production end to end test use case and was wondering if you have a timeline for supporting version tags for docker image?

It would be really nice and helpful to have that.

@Gwerlas
Copy link

Gwerlas commented Aug 20, 2018

Even better, perhaps is it possible to become the official repo on docker hub and the users could launch testcafe like this :

docker run testcafe
docker run testcafe:0.21.1

And You'll benefit of the layers vulnerability scanning.
With an automatic build and the link between GitHub and Docker Hub, you'll have the README and the Dockerfile displayed and up to date in Docker Hub.

@AndreyBelym AndreyBelym added this to the Sprint #17 milestone Aug 21, 2018
@AndreyBelym
Copy link
Contributor

Hi @Gwerlas, thanks for the hint! I think I will try to get the official image status next sprint (2-3 weeks usually).

@kruckenb
Copy link

It looks like Gulpfile.js has most of what's needed to publish with tags, with some tweaks.

const PUBLISH_TAG = JSON.parse(fs.readFileSync(path.join(__dirname, '.publishrc')).toString()).publishTag;
[...]
childProcess.execSync('docker tag ' + imageId + ' testcafe/testcafe:' + PUBLISH_TAG, {

If the version was added to publishTag in .publishrc when Bump version commits are generated (like this example modified from 6e8e806)

diff --git a/.publishrc b/.publishrc
@@ -8,7 +8,7 @@
     "gitTag": true
   },
   "confirm": true,
-  "publishTag": ["alpha","0.23.0-alpha.2"],
+  "publishTag": ["latest","0.23.0"],
   "prePublishScript": "gulp test-server",
   "postPublishScript": "gulp docker-publish"
 }

then Gulpfile.js could also generate a version tag, something like this (not tested):

diff --git a/Gulpfile.js b/Gulpfile.js
@@ -743,16 +743,13 @@ gulp.task('docker-build', done => {
         }
     }

-    const imageId = childProcess
-        .execSync('docker build -q -t testcafe -f docker/Dockerfile .', { env: process.env })
+    const tagParam = PUBLISH_TAG.map((tag) => { return `-t testcafe/testcafe:${tag}`; });
+
+    childProcess
+        .execSync(`docker build -q ${tagParam} -f docker/Dockerfile .`, { env: process.env }
         .toString()
         .replace(/\n/g, '');

-    childProcess.execSync('docker tag ' + imageId + ' testcafe/testcafe:' + PUBLISH_TAG, {
-        stdio: 'inherit',
-        env:   process.env
-    });
-
     done();
 });

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: docker STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: enhancement The accepted proposal for future implementation.
Projects
None yet
Development

No branches or pull requests

8 participants